From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 1 00:48:23 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Thu Jul 31 23:48:26 2003 Subject: [Rxtx] Re: USB API for w32 [was Hi!] In-Reply-To: Message-ID: On Thu, 31 Jul 2003, Savio, John-Benedict-Domnic (FH) wrote: > Hello Trent, > > Is there an API for USB running in the Windows OS !. > Hi Domnic you may want to check out the jusb http://jusb.sourceforge.net/ I've cc'd their email list but you may want to join and ask questions there. RXTX works with Mac OSX USB but not w32 USB. -- Trent Jarvi taj@www.linux.org.uk www.rxtx.org From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 1 01:08:34 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri Aug 1 00:08:36 2003 Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Mon, 28 Jul 2003, Webmaster wrote: > Hey Trent, > > We've talked in the past about you providing a Binary release for 2.0, and > I understand you have some more important things to do. I would like to > take it upon myself to produce a binary release of 2.0, and make it > available. At which point, I'd update my How-To to reflect the changes. > I also plan to incorporate the How-To in the release. > > Now, I realize that the GPL allows this without your written permission > (so as I follow the GPL), but I wanted to let you know before I did it. > Also, I wanted to let you know that I'm willing to take this as an > opportunity to offload some of your work onto me. As we've discussed in > the past, I'm mainly interested in the version that forks off of Sun's > Comm API (for ease of portability... I realize that RXTX can also run on > the same platforms). So, it would be worth it to me to contribute time to > produce a binary release. > > I thought I'd start with an x86 Linux binary release since it > is the only platform I currently have access to a compiler. And then, if > you have contacts for the other platforms, I'd do all of the legwork to > get them to provide a binary for their respective platform. > > Anyway, let me know if you have a problem with this, or if there is > anything you think I should know before doing this. > > Thanks Trent, > > Wade > Hi Wade This would work well. I was asking on the rxtx mail list if anyone wanted to handle rxtx 2.0. What needs to happen is: 1) merge with rxtx 2.1 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved type changes. 3) compile the binaries. I can help if things get hard. I can also produce w32 binaries which is always 'interesting.' I'm sure some things will be difficult the first time through but easier later. I've been shown a patch from the kaffe group which merges rxtx 2.1 into kaffe as javax.comm. There are also discussions going on between classpath and kaffe. It should be OK license wise for them to do this. Kaffe should have something Aug 11th I'm told. You may want to check out all of your options before deciding which way to go. -- Trent Jarvi taj@www.linux.org.uk From taj at linuxgrrls.org Fri Aug 1 01:26:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Aug 1 00:26:27 2003 Subject: [Rxtx] infinite OUTPUT_BUFFER_EMPTY serial event In-Reply-To: References: Message-ID: On Wed, 30 Jul 2003, Dohnald Escuro wrote: > Hi! I'm Vicel Borlongan from the Philippines. I've been using RXTX Comm API for > our POS project. > Just want to ask for your help regarding its implementation. I've been having > problem receiving input streams > from rxtx 2.1-6 because it seems to generates infinite OUTPUT_BUFFER_EMPTY > serial event. > > Is there a way I could make the input stream behavior much like that of JAVA > Comm API where the > OUTPUT_BUFFER_EMPTY serial event stops at a certain point. > Hi Vicel Are you getting more than one OUTPUT_BUFFER_EMPTY per system write? If so, which OS is this observed on? If you are doing many one character write()'s I could see many of these being generated. This could point to a difference in rxtx which does not buffer and Sun's CommAPI which does (at least in the documentation). You could try using one of Sun's buffered output streams with rxtx to see if that is the issue. From taj at linuxgrrls.org Fri Aug 1 01:45:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Aug 1 00:45:56 2003 Subject: [Rxtx] Java and Multiport serial port In-Reply-To: <20030727004557.58908.qmail@web8007.mail.in.yahoo.com> References: <20030727004557.58908.qmail@web8007.mail.in.yahoo.com> Message-ID: On Sun, 27 Jul 2003, [iso-8859-1] Sumit wrote: > Hi Trent, > --- Trent Jarvi wrote: > > > > > > > A typical patch which was just posted to the list > > looks like this: > > Just two more question: > > (a) Is it possible to get the archives of this > mailing list. The link on > http://www.linuxgrrls.org/mailman/listinfo/rxtx/ to > the archives does not work. This is an issue at the moment. I think jasmine our system administrator is in the process of moving. We are aware it is not working. > > (b) From where can I get the source code to make the > change you suggested. I downloaded the package from > http://www.linux.org.uk/~taj/rxtx-bins.1.tar.gz I obviously was not thinking ahead when I named the collection of binaries rxtx-bins.1.tar.gz but the libraries inside to have the version # in the name. http://www.frii.com/~jarvi/rxtx/download/rxtx-1.5-8.tar.gz These are fairly dated. rxtx 2.1-7pre16 is the current code with fixes if you see problems. Really rxtx-2.1-6 is going to have almost all fixes for linux. rxtx-2.1-7pre's are primarily w32 fixes. http://www.frii.com/~jarvi/rxtx/download/rxtx-2.1-6.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz (the URLs are different to avoid limit$ on the isp side) > > > > > A quick and dirty solution is to rename /dev/ttyR* > > /dev/ttyS*. > > I tried this and it worked. > > Thanks however for the help. Atleast I now have one > way of getting things done. > > Sumit > > ===== > > The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance. > Confucius BC 551-479, Chinese Ethical Teacher, Philosopher > > > > > ________________________________________________________________________ > Send free SMS using the Yahoo! Messenger. Go to http://in.mobile.yahoo.com/new/pc/ > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Fri Aug 1 18:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Aug 1 17:44:19 2003 Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW@-3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous@cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sun Aug 3 04:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun Aug 3 03:32:17 2003 Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > -- Trent Jarvi taj@www.linux.org.uk From peck at advancen.com Mon Aug 4 08:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon Aug 4 08:59:16 2003 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 10:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon Aug 4 09:44:15 2003 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 11:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon Aug 4 10:29:51 2003 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 17:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon Aug 4 16:07:16 2003 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 10:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed Aug 6 10:21:36 2003 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 12:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed Aug 6 11:04:53 2003 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 18:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed Aug 6 18:15:22 2003 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed Aug 6 18:28:03 2003 Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://hex.linuxgrrls.org/pipermail/rxtx/attachments/20030806/a334e572/attachment.htm From jasmine at regolith.co.uk Wed Aug 6 19:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed Aug 6 18:53:49 2003 Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 20:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed Aug 6 19:53:43 2003 Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine@regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed Aug 6 20:34:26 2003 Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://hex.linuxgrrls.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment.htm From taj at linuxgrrls.org Wed Aug 6 21:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed Aug 6 20:53:26 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed Aug 6 21:13:05 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://hex.linuxgrrls.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment.htm From WCrucius at sandc.com Wed Aug 6 16:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed Aug 6 21:24:58 2003 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso@yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://hex.linuxgrrls.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0001.htm From taj at linuxgrrls.org Wed Aug 6 22:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed Aug 6 21:39:14 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso@yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed Aug 6 22:03:27 2003 Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso@yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://hex.linuxgrrls.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment.htm From taj at linuxgrrls.org Sat Aug 9 07:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat Aug 9 06:43:56 2003 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 15:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun Aug 17 21:51:17 2003 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 23:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun Aug 17 22:31:51 2003 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 18:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun Aug 17 22:32:43 2003 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 06:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon Aug 18 12:48:15 2003 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 08:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon Aug 18 12:59:44 2003 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 14:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue Aug 19 14:07:35 2003 Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 10:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue Aug 19 14:32:50 2003 Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer@swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 22:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Aug 19 21:17:03 2003 Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer@swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 17:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed Aug 20 03:50:14 2003 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Wed Aug 20 05:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed Aug 20 04:04:44 2003 Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Wed Aug 20 06:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed Aug 20 05:33:35 2003 Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Wed Aug 20 01:55:22 2003 From: son at openbx.net (Son To) Date: Wed Aug 20 05:56:08 2003 Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Wed Aug 20 07:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed Aug 20 06:33:50 2003 Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 06:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed Aug 20 12:38:53 2003 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 17:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed Aug 20 21:28:06 2003 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 23:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed Aug 20 22:25:38 2003 Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Thu Aug 21 03:11:10 2003 Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx@hex.linuxgrrls.org and rxtx@undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Thu Aug 21 04:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu Aug 21 03:17:03 2003 Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg@yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx@hex.linuxgrrls.org and > rxtx@undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx@undine.linuxgrrls.org rxtx@hex.linuxgrrls.org rxtx@linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu Aug 21 13:27:13 2003 Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg@yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx@hex.linuxgrrls.org and > > rxtx@undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx@undine.linuxgrrls.org > rxtx@hex.linuxgrrls.org > rxtx@linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 17:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu Aug 21 16:00:37 2003 Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 17:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri Aug 22 16:52:39 2003 Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj@www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj@www.linux.org.uk, rxtx@linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 18:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri Aug 22 22:52:25 2003 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj@linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 06:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat Aug 23 05:12:27 2003 Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat Aug 23 14:58:40 2003 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 11:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat Aug 23 15:09:31 2003 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 11:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat Aug 23 15:30:11 2003 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 16:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat Aug 23 15:49:21 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://hex.linuxgrrls.org/pipermail/rxtx/attachments/20030823/02af687c/attachment.htm From taj at linuxgrrls.org Sat Aug 23 23:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat Aug 23 22:00:10 2003 Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 23:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat Aug 23 22:00:59 2003 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sun Aug 24 01:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun Aug 24 00:34:06 2003 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sun Aug 24 02:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun Aug 24 01:17:17 2003 Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 11:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon Aug 25 10:31:51 2003 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon Aug 25 13:23:58 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://hex.linuxgrrls.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment.htm From ricardo.trindade at emation.pt Mon Aug 25 18:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon Aug 25 17:19:23 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://hex.linuxgrrls.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment.htm From Beat.Meier at gmx.ch Fri Aug 22 13:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Tue Aug 26 08:11:00 2003 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 02:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue Aug 26 08:11:09 2003 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 10:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Aug 26 09:26:19 2003 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 16:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue Aug 26 14:28:51 2003 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 19:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue Aug 26 18:56:17 2003 Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 15:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue Aug 26 20:26:45 2003 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed Aug 27 00:58:20 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://hex.linuxgrrls.org/pipermail/rxtx/attachments/20030826/44bac4e9/attachment-0001.htm From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed Aug 27 00:58:26 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://hex.linuxgrrls.org/pipermail/rxtx/attachments/20030826/5940ebad/attachment-0001.htm From taj at linuxgrrls.org Wed Aug 27 06:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed Aug 27 05:04:16 2003 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Wed Aug 27 06:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed Aug 27 05:13:45 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 10:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed Aug 27 08:54:21 2003 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 10:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed Aug 27 08:56:46 2003 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 10:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed Aug 27 09:22:24 2003 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx@linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 10:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed Aug 27 09:28:53 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://hex.linuxgrrls.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0001.htm From ricardo.trindade at emation.pt Wed Aug 27 10:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed Aug 27 09:32:46 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 10:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed Aug 27 09:46:00 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 13:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed Aug 27 18:26:31 2003 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 20:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed Aug 27 18:32:01 2003 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj@www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry@12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry@12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry@12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry@12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry@12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Thu Aug 28 04:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu Aug 28 03:45:41 2003 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu Aug 28 16:18:36 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://hex.linuxgrrls.org/pipermail/rxtx/attachments/20030828/9b501055/attachment.htm From taj at linuxgrrls.org Thu Aug 28 18:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu Aug 28 17:05:28 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 16:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu Aug 28 21:18:44 2003 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Fri Aug 29 01:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Aug 29 00:07:21 2003 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://hex.linuxgrrls.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment.htm From taj at linuxgrrls.org Fri Aug 29 02:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Aug 29 01:08:07 2003 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Fri Aug 29 04:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Aug 29 03:22:36 2003 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Fri Aug 29 04:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Aug 29 03:25:54 2003 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat Aug 30 08:07:05 2003 Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 1 00:08:34 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri Jun 3 17:45:41 2005 Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Mon, 28 Jul 2003, Webmaster wrote: > Hey Trent, > > We've talked in the past about you providing a Binary release for 2.0, and > I understand you have some more important things to do. I would like to > take it upon myself to produce a binary release of 2.0, and make it > available. At which point, I'd update my How-To to reflect the changes. > I also plan to incorporate the How-To in the release. > > Now, I realize that the GPL allows this without your written permission > (so as I follow the GPL), but I wanted to let you know before I did it. > Also, I wanted to let you know that I'm willing to take this as an > opportunity to offload some of your work onto me. As we've discussed in > the past, I'm mainly interested in the version that forks off of Sun's > Comm API (for ease of portability... I realize that RXTX can also run on > the same platforms). So, it would be worth it to me to contribute time to > produce a binary release. > > I thought I'd start with an x86 Linux binary release since it > is the only platform I currently have access to a compiler. And then, if > you have contacts for the other platforms, I'd do all of the legwork to > get them to provide a binary for their respective platform. > > Anyway, let me know if you have a problem with this, or if there is > anything you think I should know before doing this. > > Thanks Trent, > > Wade > Hi Wade This would work well. I was asking on the rxtx mail list if anyone wanted to handle rxtx 2.0. What needs to happen is: 1) merge with rxtx 2.1 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved type changes. 3) compile the binaries. I can help if things get hard. I can also produce w32 binaries which is always 'interesting.' I'm sure some things will be difficult the first time through but easier later. I've been shown a patch from the kaffe group which merges rxtx 2.1 into kaffe as javax.comm. There are also discussions going on between classpath and kaffe. It should be OK license wise for them to do this. Kaffe should have something Aug 11th I'm told. You may want to check out all of your options before deciding which way to go. -- Trent Jarvi taj@www.linux.org.uk From taj at linuxgrrls.org Fri Aug 1 00:26:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:41 2005 Subject: [Rxtx] infinite OUTPUT_BUFFER_EMPTY serial event In-Reply-To: References: Message-ID: On Wed, 30 Jul 2003, Dohnald Escuro wrote: > Hi! I'm Vicel Borlongan from the Philippines. I've been using RXTX Comm API for > our POS project. > Just want to ask for your help regarding its implementation. I've been having > problem receiving input streams > from rxtx 2.1-6 because it seems to generates infinite OUTPUT_BUFFER_EMPTY > serial event. > > Is there a way I could make the input stream behavior much like that of JAVA > Comm API where the > OUTPUT_BUFFER_EMPTY serial event stops at a certain point. > Hi Vicel Are you getting more than one OUTPUT_BUFFER_EMPTY per system write? If so, which OS is this observed on? If you are doing many one character write()'s I could see many of these being generated. This could point to a difference in rxtx which does not buffer and Sun's CommAPI which does (at least in the documentation). You could try using one of Sun's buffered output streams with rxtx to see if that is the issue. From taj at linuxgrrls.org Fri Aug 1 00:45:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:41 2005 Subject: [Rxtx] Java and Multiport serial port In-Reply-To: <20030727004557.58908.qmail@web8007.mail.in.yahoo.com> References: <20030727004557.58908.qmail@web8007.mail.in.yahoo.com> Message-ID: On Sun, 27 Jul 2003, [iso-8859-1] Sumit wrote: > Hi Trent, > --- Trent Jarvi wrote: > > > > > > > A typical patch which was just posted to the list > > looks like this: > > Just two more question: > > (a) Is it possible to get the archives of this > mailing list. The link on > http://www.linuxgrrls.org/mailman/listinfo/rxtx/ to > the archives does not work. This is an issue at the moment. I think jasmine our system administrator is in the process of moving. We are aware it is not working. > > (b) From where can I get the source code to make the > change you suggested. I downloaded the package from > http://www.linux.org.uk/~taj/rxtx-bins.1.tar.gz I obviously was not thinking ahead when I named the collection of binaries rxtx-bins.1.tar.gz but the libraries inside to have the version # in the name. http://www.frii.com/~jarvi/rxtx/download/rxtx-1.5-8.tar.gz These are fairly dated. rxtx 2.1-7pre16 is the current code with fixes if you see problems. Really rxtx-2.1-6 is going to have almost all fixes for linux. rxtx-2.1-7pre's are primarily w32 fixes. http://www.frii.com/~jarvi/rxtx/download/rxtx-2.1-6.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz (the URLs are different to avoid limit$ on the isp side) > > > > > A quick and dirty solution is to rename /dev/ttyR* > > /dev/ttyS*. > > I tried this and it worked. > > Thanks however for the help. Atleast I now have one > way of getting things done. > > Sumit > > ===== > > The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance. > Confucius BC 551-479, Chinese Ethical Teacher, Philosopher > > > > > ________________________________________________________________________ > Send free SMS using the Yahoo! Messenger. Go to http://in.mobile.yahoo.com/new/pc/ > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Fri Aug 1 17:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:42 2005 Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW@-3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous@cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sun Aug 3 03:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri Jun 3 17:45:42 2005 Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > -- Trent Jarvi taj@www.linux.org.uk From peck at advancen.com Mon Aug 4 08:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Fri Jun 3 17:45:42 2005 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 09:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:42 2005 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 10:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Fri Jun 3 17:45:42 2005 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 16:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:42 2005 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 10:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Fri Jun 3 17:45:42 2005 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 11:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:42 2005 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 18:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Fri Jun 3 17:45:42 2005 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 18:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 17:45:42 2005 Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0002.htm From jasmine at regolith.co.uk Wed Aug 6 18:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Fri Jun 3 17:45:42 2005 Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 19:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:42 2005 Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine@regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 20:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 17:45:42 2005 Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0002.htm From taj at linuxgrrls.org Wed Aug 6 20:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:43 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 21:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 17:45:43 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0002.htm From WCrucius at sandc.com Wed Aug 6 21:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Fri Jun 3 17:45:43 2005 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso@yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0002.htm From taj at linuxgrrls.org Wed Aug 6 21:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:43 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso@yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 22:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 17:45:43 2005 Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso@yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0002.htm From taj at linuxgrrls.org Sat Aug 9 06:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:43 2005 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 21:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Fri Jun 3 17:45:43 2005 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 22:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:43 2005 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 22:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Fri Jun 3 17:45:43 2005 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 12:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Fri Jun 3 17:45:43 2005 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 12:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 14:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 14:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer@swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 21:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer@swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 21:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Wed Aug 20 04:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Wed Aug 20 05:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Wed Aug 20 05:55:22 2003 From: son at openbx.net (Son To) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Wed Aug 20 06:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 12:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 21:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 22:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Thu Aug 21 03:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx@hex.linuxgrrls.org and rxtx@undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Thu Aug 21 03:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg@yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx@hex.linuxgrrls.org and > rxtx@undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx@undine.linuxgrrls.org rxtx@hex.linuxgrrls.org rxtx@linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 13:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg@yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx@hex.linuxgrrls.org and > > rxtx@undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx@undine.linuxgrrls.org > rxtx@hex.linuxgrrls.org > rxtx@linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 16:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 16:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri Jun 3 17:45:44 2005 Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj@www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj@www.linux.org.uk, rxtx@linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 22:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri Jun 3 17:45:45 2005 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj@linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 05:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:45 2005 Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 14:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Fri Jun 3 17:45:45 2005 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 15:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 17:45:45 2005 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 15:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 17:45:45 2005 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 15:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:45:45 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0002.htm From taj at linuxgrrls.org Sat Aug 23 22:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:45 2005 Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 22:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:45 2005 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sun Aug 24 00:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:45:45 2005 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sun Aug 24 01:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:45 2005 Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 10:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:45:45 2005 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 13:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 17:45:46 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0002.htm From ricardo.trindade at emation.pt Mon Aug 25 17:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:45:46 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0002.htm From Beat.Meier at gmx.ch Fri Aug 22 16:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri Jun 3 17:45:46 2005 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 07:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Fri Jun 3 17:45:46 2005 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 09:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:46 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 14:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Fri Jun 3 17:45:46 2005 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 18:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:46 2005 Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 20:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Fri Jun 3 17:45:46 2005 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Wed Aug 27 00:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 17:45:46 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030826/44bac4e9/attachment-0002.htm From pcolagrosso at yahoo.com Wed Aug 27 00:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 17:45:47 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030826/5940ebad/attachment-0002.htm From taj at linuxgrrls.org Wed Aug 27 05:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:47 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Wed Aug 27 05:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:47 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 08:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Fri Jun 3 17:45:47 2005 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 08:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Fri Jun 3 17:45:47 2005 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 09:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:47 2005 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx@linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 09:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:45:47 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0002.htm From ricardo.trindade at emation.pt Wed Aug 27 09:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:45:47 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 09:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:48 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 18:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Fri Jun 3 17:45:48 2005 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 18:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Fri Jun 3 17:45:48 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj@www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry@12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry@12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry@12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry@12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry@12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Thu Aug 28 03:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:48 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 16:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 17:45:48 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0002.htm From taj at linuxgrrls.org Thu Aug 28 17:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:48 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 21:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Fri Jun 3 17:45:48 2005 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Fri Aug 29 00:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 17:45:48 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0002.htm From taj at linuxgrrls.org Fri Aug 29 01:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Fri Aug 29 03:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Fri Aug 29 03:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 08:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Fri Jun 3 17:45:49 2005 Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 1 00:08:34 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri Jun 3 18:08:03 2005 Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Mon, 28 Jul 2003, Webmaster wrote: > Hey Trent, > > We've talked in the past about you providing a Binary release for 2.0, and > I understand you have some more important things to do. I would like to > take it upon myself to produce a binary release of 2.0, and make it > available. At which point, I'd update my How-To to reflect the changes. > I also plan to incorporate the How-To in the release. > > Now, I realize that the GPL allows this without your written permission > (so as I follow the GPL), but I wanted to let you know before I did it. > Also, I wanted to let you know that I'm willing to take this as an > opportunity to offload some of your work onto me. As we've discussed in > the past, I'm mainly interested in the version that forks off of Sun's > Comm API (for ease of portability... I realize that RXTX can also run on > the same platforms). So, it would be worth it to me to contribute time to > produce a binary release. > > I thought I'd start with an x86 Linux binary release since it > is the only platform I currently have access to a compiler. And then, if > you have contacts for the other platforms, I'd do all of the legwork to > get them to provide a binary for their respective platform. > > Anyway, let me know if you have a problem with this, or if there is > anything you think I should know before doing this. > > Thanks Trent, > > Wade > Hi Wade This would work well. I was asking on the rxtx mail list if anyone wanted to handle rxtx 2.0. What needs to happen is: 1) merge with rxtx 2.1 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved type changes. 3) compile the binaries. I can help if things get hard. I can also produce w32 binaries which is always 'interesting.' I'm sure some things will be difficult the first time through but easier later. I've been shown a patch from the kaffe group which merges rxtx 2.1 into kaffe as javax.comm. There are also discussions going on between classpath and kaffe. It should be OK license wise for them to do this. Kaffe should have something Aug 11th I'm told. You may want to check out all of your options before deciding which way to go. -- Trent Jarvi taj@www.linux.org.uk From taj at linuxgrrls.org Fri Aug 1 00:26:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:03 2005 Subject: [Rxtx] infinite OUTPUT_BUFFER_EMPTY serial event In-Reply-To: References: Message-ID: On Wed, 30 Jul 2003, Dohnald Escuro wrote: > Hi! I'm Vicel Borlongan from the Philippines. I've been using RXTX Comm API for > our POS project. > Just want to ask for your help regarding its implementation. I've been having > problem receiving input streams > from rxtx 2.1-6 because it seems to generates infinite OUTPUT_BUFFER_EMPTY > serial event. > > Is there a way I could make the input stream behavior much like that of JAVA > Comm API where the > OUTPUT_BUFFER_EMPTY serial event stops at a certain point. > Hi Vicel Are you getting more than one OUTPUT_BUFFER_EMPTY per system write? If so, which OS is this observed on? If you are doing many one character write()'s I could see many of these being generated. This could point to a difference in rxtx which does not buffer and Sun's CommAPI which does (at least in the documentation). You could try using one of Sun's buffered output streams with rxtx to see if that is the issue. From taj at linuxgrrls.org Fri Aug 1 00:45:55 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:03 2005 Subject: [Rxtx] Java and Multiport serial port In-Reply-To: <20030727004557.58908.qmail@web8007.mail.in.yahoo.com> References: <20030727004557.58908.qmail@web8007.mail.in.yahoo.com> Message-ID: On Sun, 27 Jul 2003, [iso-8859-1] Sumit wrote: > Hi Trent, > --- Trent Jarvi wrote: > > > > > > > A typical patch which was just posted to the list > > looks like this: > > Just two more question: > > (a) Is it possible to get the archives of this > mailing list. The link on > http://www.linuxgrrls.org/mailman/listinfo/rxtx/ to > the archives does not work. This is an issue at the moment. I think jasmine our system administrator is in the process of moving. We are aware it is not working. > > (b) From where can I get the source code to make the > change you suggested. I downloaded the package from > http://www.linux.org.uk/~taj/rxtx-bins.1.tar.gz I obviously was not thinking ahead when I named the collection of binaries rxtx-bins.1.tar.gz but the libraries inside to have the version # in the name. http://www.frii.com/~jarvi/rxtx/download/rxtx-1.5-8.tar.gz These are fairly dated. rxtx 2.1-7pre16 is the current code with fixes if you see problems. Really rxtx-2.1-6 is going to have almost all fixes for linux. rxtx-2.1-7pre's are primarily w32 fixes. http://www.frii.com/~jarvi/rxtx/download/rxtx-2.1-6.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz (the URLs are different to avoid limit$ on the isp side) > > > > > A quick and dirty solution is to rename /dev/ttyR* > > /dev/ttyS*. > > I tried this and it worked. > > Thanks however for the help. Atleast I now have one > way of getting things done. > > Sumit > > ===== > > The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance. > Confucius BC 551-479, Chinese Ethical Teacher, Philosopher > > > > > ________________________________________________________________________ > Send free SMS using the Yahoo! Messenger. Go to http://in.mobile.yahoo.com/new/pc/ > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Fri Aug 1 17:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:03 2005 Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW@-3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous@cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sun Aug 3 03:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri Jun 3 18:08:03 2005 Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj@www.linux.org.uk > > > -- Trent Jarvi taj@www.linux.org.uk From peck at advancen.com Mon Aug 4 08:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Fri Jun 3 18:08:03 2005 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 09:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:03 2005 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 10:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Fri Jun 3 18:08:03 2005 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 16:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:03 2005 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 10:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Fri Jun 3 18:08:03 2005 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 11:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:03 2005 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 18:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Fri Jun 3 18:08:04 2005 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 18:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 18:08:04 2005 Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0003.htm From jasmine at regolith.co.uk Wed Aug 6 18:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Fri Jun 3 18:08:04 2005 Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 19:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:04 2005 Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine@regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 20:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 18:08:04 2005 Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0003.htm From taj at linuxgrrls.org Wed Aug 6 20:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:04 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 21:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 18:08:04 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0003.htm From WCrucius at sandc.com Wed Aug 6 21:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Fri Jun 3 18:08:04 2005 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso@yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0003.htm From taj at linuxgrrls.org Wed Aug 6 21:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:04 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso@yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 22:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso@yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0003.htm From taj at linuxgrrls.org Sat Aug 9 06:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 21:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 22:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 22:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 12:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 12:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 14:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 14:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer@swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty@averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 21:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer@swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 21:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Wed Aug 20 04:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Wed Aug 20 05:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Wed Aug 20 05:55:22 2003 From: son at openbx.net (Son To) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Wed Aug 20 06:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:05 2005 Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 12:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Fri Jun 3 18:08:06 2005 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 21:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri Jun 3 18:08:06 2005 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 22:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:06 2005 Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Thu Aug 21 03:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Fri Jun 3 18:08:06 2005 Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx@hex.linuxgrrls.org and rxtx@undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Thu Aug 21 03:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:06 2005 Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg@yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx@hex.linuxgrrls.org and > rxtx@undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx@undine.linuxgrrls.org rxtx@hex.linuxgrrls.org rxtx@linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 13:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Fri Jun 3 18:08:06 2005 Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg@yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx@hex.linuxgrrls.org and > > rxtx@undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx@undine.linuxgrrls.org > rxtx@hex.linuxgrrls.org > rxtx@linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 16:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Fri Jun 3 18:08:06 2005 Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 16:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri Jun 3 18:08:06 2005 Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj@www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj@www.linux.org.uk, rxtx@linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 22:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri Jun 3 18:08:06 2005 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj@linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 05:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:06 2005 Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 14:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Fri Jun 3 18:08:06 2005 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 15:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 18:08:06 2005 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 15:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 18:08:06 2005 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 15:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:06 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0003.htm From taj at linuxgrrls.org Sat Aug 23 22:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:07 2005 Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 22:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:07 2005 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sun Aug 24 00:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:07 2005 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sun Aug 24 01:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:07 2005 Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 10:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:07 2005 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 13:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 18:08:07 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0003.htm From ricardo.trindade at emation.pt Mon Aug 25 17:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:07 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0003.htm From Beat.Meier at gmx.ch Fri Aug 22 16:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri Jun 3 18:08:07 2005 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 07:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Fri Jun 3 18:08:07 2005 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 09:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:07 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 14:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Fri Jun 3 18:08:08 2005 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 18:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:08 2005 Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 20:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Fri Jun 3 18:08:08 2005 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Wed Aug 27 00:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 18:08:08 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030826/44bac4e9/attachment-0003.htm From pcolagrosso at yahoo.com Wed Aug 27 00:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 18:08:08 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030826/5940ebad/attachment-0003.htm From taj at linuxgrrls.org Wed Aug 27 05:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:08 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Wed Aug 27 05:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:08 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 08:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Fri Jun 3 18:08:08 2005 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 08:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Fri Jun 3 18:08:08 2005 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 09:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:09 2005 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx@linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 09:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:09 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0003.htm From ricardo.trindade at emation.pt Wed Aug 27 09:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:09 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 09:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:09 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 18:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Fri Jun 3 18:08:09 2005 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 18:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Fri Jun 3 18:08:09 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj@www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry@12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry@12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry@12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry@12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry@12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry@12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Thu Aug 28 03:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:09 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 16:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Fri Jun 3 18:08:10 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0003.htm From taj at linuxgrrls.org Thu Aug 28 17:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:10 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 21:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Fri Jun 3 18:08:10 2005 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Fri Aug 29 00:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri Jun 3 18:08:10 2005 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0003.htm From taj at linuxgrrls.org Fri Aug 29 01:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:10 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Fri Aug 29 03:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:10 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Fri Aug 29 03:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri Jun 3 18:08:10 2005 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 08:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Fri Jun 3 18:08:10 2005 Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0395.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0395.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0395.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0395.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0395.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0395.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0395.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0395.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0395.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0395.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0395.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0395.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0395.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0396.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0396.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0396.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0396.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0396.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0396.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0396.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0396.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0396.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0396.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0396.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0396.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0396.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0397.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0397.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0397.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0397.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0397.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0397.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0397.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0397.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0397.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0397.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0397.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0397.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0397.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0398.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0398.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0398.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0398.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0398.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0398.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0398.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0398.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0398.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0398.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0398.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0398.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0398.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0399.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0399.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0399.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0399.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0399.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0399.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0399.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0399.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0399.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0399.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0399.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0399.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0399.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0400.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0400.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0400.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0400.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0400.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0400.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0400.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0400.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0400.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0400.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0400.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0400.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0400.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0401.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0401.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0401.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0401.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0401.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0401.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0401.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0401.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0401.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0401.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0401.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0401.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0401.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0402.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0402.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0402.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0402.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0402.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0402.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0402.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0402.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0402.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0402.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0402.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0402.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0402.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0403.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0403.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0403.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0403.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0403.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0403.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0403.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0403.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0403.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0403.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0403.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0403.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0403.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0404.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0404.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0404.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0404.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0404.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0404.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0404.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0404.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0404.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0404.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0404.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0404.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0404.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0001.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0001.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0001.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0001.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0001.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0001.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0001.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0001.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0001.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0001.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0001.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0001.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0001.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0002.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0002.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0002.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0002.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0002.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0002.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0002.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0002.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0002.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0002.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0002.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0002.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0002.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0003.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0003.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0003.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0003.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0003.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0003.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0003.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0003.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0003.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0003.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0003.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0003.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0003.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0004.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0004.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0004.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0004.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0004.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0004.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0004.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0004.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0004.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0004.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0004.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0004.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0004.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0005.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0005.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0005.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0005.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0005.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0005.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0005.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0005.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0005.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0005.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0005.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0005.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0005.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0006.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0006.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0006.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0006.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0006.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0006.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0006.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0006.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0006.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0006.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0006.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0006.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0006.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0007.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0007.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0007.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0007.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0007.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0007.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0007.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0007.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0007.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0007.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0007.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0007.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0007.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0008.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0008.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0008.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0008.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0008.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0008.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0008.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0008.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0008.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0008.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0008.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0008.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0008.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0009.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0009.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0009.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0009.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0009.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0009.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0009.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0009.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0009.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0009.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0009.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0009.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0009.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0010.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0010.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0010.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0010.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0010.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0010.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0010.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0010.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0010.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0010.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0010.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0010.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0010.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0001.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0001.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0001.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0001.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0001.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0001.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0001.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0001.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0001.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0001.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0001.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0001.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0001.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0002.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0002.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0002.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0002.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0002.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0002.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0002.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0002.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0002.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0002.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0002.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0002.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0002.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0003.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0003.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0003.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0003.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0003.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0003.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0003.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0003.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0003.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0003.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0003.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0003.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0003.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0004.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0004.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0004.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0004.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0004.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0004.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0004.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0004.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0004.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0004.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0004.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0004.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0004.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0005.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0005.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0005.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0005.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0005.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0005.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something similar, in my experience (at least in 485) > just specifying the end char is very limiting. > > thanks > Ricardo > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: sabado, 23 de Agosto de 2003 22:00 > Para: Java RXTX discussion > Assunto: Re: [Rxtx] rxtxwin32 > > > > > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > > The following issues are known on w32: > > # Baudrates of 128000 * N may have problems > # Add a method for re-checking for valid ports > # Add support in RXTX to specify valid ports on the PC. > # Adding support for half duplex serial communication. > # Error events for parity errors. > # Baudrate of 5 > # serial break time > # terminating character checking for reads > # Event listeners need to be added when the port is opened to initialize > the native structures. > # Closing a port from an event listener results in a deadlock. > # Closing a port without adding an event listener results in a deadlock. > > On Sat, 23 Aug 2003, John Adams wrote: > > > > > Hi there rxtx land > > > > Does rxtx2.1 work with windoze ? > > Thanks > > john > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site design software > > http://sitebuilder.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Mon Aug 25 03:26:50 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 10:26:50 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? R:I do no think this is what is needed. A higher level api would be needed, in wich the application programmer could give rxtx a method to determine wether the terminating character has been reached. But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? R: I don't think it's essential to do it on write, because the application programmer knows how many bytes he needs to write, and therefore can give that info to write. Perhaps people with different requirements could add extra feedback here. From pcolagrosso at yahoo.com Mon Aug 25 06:23:54 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Mon, 25 Aug 2003 05:23:54 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/554d4e09/attachment-0005.html From ricardo.trindade at emation.pt Mon Aug 25 10:14:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Mon, 25 Aug 2003 17:14:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030825122354.24310.qmail@web13904.mail.yahoo.com> Message-ID: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030825/a886b8e4/attachment-0005.html From Beat.Meier at gmx.ch Fri Aug 22 09:00:40 2003 From: Beat.Meier at gmx.ch (Beat Meier) Date: Fri, 22 Aug 2003 12:00:40 -0300 Subject: [Rxtx] rxtx-2.1-6 enhancements Message-ID: <3F463018.7070102@gmx.ch> Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From Scott.Hughes at dalsemi.com Tue Aug 26 00:31:46 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 01:31:46 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> I'm having a little trouble getting a working build of 2.1.x for linux. I downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems to depend on Sun's comm.jar, which I thought should be unnecessary for rxtx2.1. Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. I'm getting the following error: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver Shouldn't 2.1 not require this class? Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is the linux binary for this release. Or, if I could figure out where to get the right source, I could just build a fresh win32 and linux lib from that. I'd prefer building from the latest source, since I believe some of the intermittent problems I was having were fixed somewhere between 2.1.7-pre12 and 2.1.7-pre16. Sorry if this message seems a bit rtfm for the list, but tfm could use a bit of an update and the list doesn't seem searchable yet. Thanks for your help... Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From taj at linuxgrrls.org Tue Aug 26 02:26:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 09:26:17 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB46E@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > I'm having a little trouble getting a working build of 2.1.x for linux. I > downloaded rxtx-2.1-6.tar.gz and tried to build from that... But that seems > to depend on Sun's comm.jar, which I thought should be unnecessary for > rxtx2.1. > > Doing a "cvs checkout rxtx-devel" seems to be pretty much the same problem. > I'm getting the following error: > > java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading > gnu.io.RXTXCommDriver > > Shouldn't 2.1 not require this class? > > Also, somehow I got my hands on a win32 rxtxSerial.dll and a RXTXcomm.jar > for 2.1.7-pre16.. But I don't know where I found it. What I'm missing is > the linux binary for this release. Or, if I could figure out where to get > the right source, I could just build a fresh win32 and linux lib from that. > > I'd prefer building from the latest source, since I believe some of the > intermittent problems I was having were fixed somewhere between 2.1.7-pre12 > and 2.1.7-pre16. > > Sorry if this message seems a bit rtfm for the list, but tfm could use a bit > of an update and the list doesn't seem searchable yet. > > Thanks for your help... > Hi Scott. I suspect you have some conflicting jar files in your classpath. RXTX 2.1 has no code references to javax.comm as it is package gnu.io. I just double checked CVS to make sure. Make sure you have no reference to javax.comm in your code, check your classpath and make sure you don't have something old hanging around in .../java/jre/lib/ext. Finally, if you checkout from CVS make sure you get hte 2.1 code with: cvs checkout -r commapi-0-0-1 rxtx-devel This is the grep from CVS rxtx-devel/src servertrent src]# grep javax * SerialImp.c: accept: javax.comm.SerialPort.PARITY_* constant SerialImp.c:This seems to jive with the way I'm reading it which is the javax.comm SerialImp.c:> forever. I pulled the following info from the javax.comm doc for the CommPort class in From david.garnier at trusted-logic.com Tue Aug 26 07:28:36 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Tue, 26 Aug 2003 15:28:36 +0200 Subject: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Hello, I have a problem accessing the COM port created by my USB card reader. Long story short, it doesn't work with the official Comm API from Sun. Since it work beautifully under Linux with the RXTX library, I was wondering if this library could work well under Windows. Now if you are still interested, here is the whole story. I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to use it under Windows 2000. For my application, I need to access the COM port directly, without going through PCSC or another interface. The documentation states that this is possible: the driver shoud create a "virtual COM port" for me to use, if PCSC is disabled. Furthermore, I need to do this under Java. I have installed the Java Comm API and it seems to working well with a serial reader. According to the Chipdrive Diagnostic software, the reader is attached to COM3 and the PCSC driver is not running. But when I try connect to the port from Java, I got a this message: No such Port COM: COM3 I think that the problem is related to the fact that the Comm API enumerates only the serial port recorded in the registry (it's in the FAQ for the Comm API). If I add a key for COM3 in the registry at HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: Port COM COM3 is already used. I tried to connect to the port using Hyperterminal and it didn't worked either. Any idea? Best Regards, David Garnier From taj at linuxgrrls.org Tue Aug 26 11:56:16 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 26 Aug 2003 18:56:16 +0100 (BST) Subject: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: On Tue, 26 Aug 2003, David Garnier wrote: > Hello, > > I have a problem accessing the COM port created by my USB card reader. Long > story short, it doesn't work with the official Comm API from Sun. Since it > work beautifully under Linux with the RXTX library, I was wondering if this > library could work well under Windows. > > Now if you are still interested, here is the whole story. > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > use it under Windows 2000. For my application, I need to access the COM > port directly, without going through PCSC or another interface. The > documentation states that this is possible: the driver shoud create a > "virtual COM port" for me to use, if PCSC is disabled. > > Furthermore, I need to do this under Java. I have installed the Java Comm > API and it seems to working well with a serial reader. > > According to the Chipdrive Diagnostic software, the reader is attached to > COM3 and the PCSC driver is not running. > > But when I try connect to the port from Java, I got a this message: > > No such Port COM: COM3 > > I think that the problem is related to the fact that the Comm API > enumerates only the serial port recorded in the registry (it's in the FAQ > for the Comm API). > > If I add a key for COM3 in the registry at > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message instead: > > Port COM COM3 is already used. > > I tried to connect to the port using Hyperterminal and it didn't worked > either. > Hyperterminal does not work? hmm. Can you verify that the USB is working with this w32 at all? When RXTX enumerates ports, it tries to open the port and does a timed out read. If the OS does not complain (No such port for instance) then the port is taken to be good. You can force the enumeration to accept port 3 in SerialImp.c with something like (replace the function currently there): JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( JNIEnv *env, jobject jobj, jstring tty_name, jint port_type ) { const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); if( !strcmp( name, "COM3" ) { printf("%s is good\n",name); (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_TRUE ); } (*env)->ReleaseStringUTFChars( env, tty_name, name ); return( JNI_FALSE ); } It would be random chance if rxtx did things the same way Sun does on w32. If you do use rxtx on w32 you want to use 2.1-7pre16 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ These are in package gnu.io so remove all previous packages before trying it. Conflicts are common. Just change the code in your file to use package gnu.io and it should work. -- except you say hyperterm is not working... From Scott.Hughes at dalsemi.com Tue Aug 26 13:26:30 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Tue, 26 Aug 2003 14:26:30 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> > cvs checkout -r commapi-0-0-1 rxtx-devel Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux from this source. Also, I had a file called jcl.jar which somehow snuck it's way into my jre/lib/ext folder and gave a conflicting definition for gnu.io.RXTXCommDriver. That was a pain to track down.. Now, I'm getting an unexpected exception from the native lib. It looks like it is happening during the constructor for CommPortIdentifier but is actually occurring in RXTXCommDriver.testRead(). Here's the exact output: Devel Library ========================================= Native lib Version = RXTX-2.1-7pre16 Java lib Version = RXTX-2.1-7pre16 An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4C403A1A Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so Current Java thread: at gnu.io.RXTXCommDriver.testRead(Native Method) at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) at gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) at com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer vice.java:195) at com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: 337) at com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess Provider.java:199) at FindiButtonsConsole.main(Unknown Source) Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From pcolagrosso at yahoo.com Tue Aug 26 17:58:14 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:14 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/44bac4e9/attachment-0005.html From pcolagrosso at yahoo.com Tue Aug 26 17:58:04 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Tue, 26 Aug 2003 16:58:04 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030826235804.85094.qmail@web13903.mail.yahoo.com> Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software_______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/5940ebad/attachment-0005.html From taj at linuxgrrls.org Tue Aug 26 22:04:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:04:14 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB5D4@misnts1.dalsemi.com> Message-ID: On Tue, 26 Aug 2003, Scott Hughes wrote: > > cvs checkout -r commapi-0-0-1 rxtx-devel > > Okay, this worked for me. I was able to build the 2.1.7pre16 bins for linux > from this source. Also, I had a file called jcl.jar which somehow snuck > it's way into my jre/lib/ext folder and gave a conflicting definition for > gnu.io.RXTXCommDriver. That was a pain to track down.. > > Now, I'm getting an unexpected exception from the native lib. It looks like > it is happening during the constructor for CommPortIdentifier but is > actually occurring in RXTXCommDriver.testRead(). Here's the exact output: > > Devel Library > ========================================= > Native lib Version = RXTX-2.1-7pre16 > Java lib Version = RXTX-2.1-7pre16 > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x4C403A1A > Function=Java_gnu_io_RXTXCommDriver_testRead+0x21A > Library=/usr/local/j2sdk1.4.1_02/jre/lib/i386/librxtxSerial-2.1-7pre16.so > > Current Java thread: > at gnu.io.RXTXCommDriver.testRead(Native Method) > at gnu.io.RXTXCommDriver.registerValidPorts(RXTXCommDriver.java:246) > at > gnu.io.RXTXCommDriver.registerScannedPorts(RXTXCommDriver.java:746) > at gnu.io.RXTXCommDriver.initialize(RXTXCommDriver.java:302) > at gnu.io.CommPortIdentifier.(CommPortIdentifier.java:68) > at > com.dalsemi.onewire.adapter.SerialService.getSerialPortIdentifiers(SerialSer > vice.java:195) > at > com.dalsemi.onewire.adapter.USerialAdapter.getPortNames(USerialAdapter.java: > 337) > at > com.dalsemi.onewire.OneWireAccessProvider.enumerateAllAdapters(OneWireAccess > Provider.java:199) > at FindiButtonsConsole.main(Unknown Source) > Hi Scott: I've seen this reported before with recent 1.4 JRE's. I suspect this is a issue related to the recent move to NPTL on Linux. The same code is not causing problems with 1.3 JRE's. So far, I've just been watching the 1.4 JRE and recommending 1.3 JRE. Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly untested currently. The big change in Java since the initial tests was the NPTL on Linux. Which vendor's JRE does this show up with? One could just have that function return JNI_TRUE as a test but I suspect its going to blow up when you call open as the code is very simular. I read through the code and could not find a place where memory corruption (SIG 11) would happen. Maybe it's time to cut out the code in question and submit a test case to the vendor. From taj at linuxgrrls.org Tue Aug 26 22:13:44 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 05:13:44 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> References: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. From david.garnier at trusted-logic.fr Wed Aug 27 01:49:50 2003 From: david.garnier at trusted-logic.fr (David Garnier) Date: Wed, 27 Aug 2003 09:49:50 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: References: <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> <5.2.0.9.0.20030826152819.02a90a18@mail.trusted-logic.fr> Message-ID: <5.2.0.9.0.20030827094444.02a3dd98@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From david.garnier at trusted-logic.com Wed Aug 27 01:56:42 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 09:56:42 +0200 Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows Message-ID: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Thanks Trent, but the problem was elsewhere. The solution is simple: do not use the Towitoko drivers at all, they do not allow you to access the COM port. Instead, uninstall this driver and install the drivers for the PL2303 chip inside the reader. These drivers are available other there: http://tech.prolific.com.tw/visitor/v_filebrw_result.asp With these drivers I can connect to the USB reader just like a serial reader, through COM3. I now have a single Java class that can communicate with any Towitoko driver, serial or USB, Linux or Windows, without a single change. That's portability! Anyway, I also manage to compile the RXTX library under Windows. That wasn't really straightforward, but it worked in the end. For example, in the makefile, there is a rule for a libmex.dll and make throws an error. I don't think that its related to RXTX since I could not find this lib anywhere. Best Regards, David Garnier At 18:56 26/08/2003 +0100, you wrote: >On Tue, 26 Aug 2003, David Garnier wrote: > > > Hello, > > > > I have a problem accessing the COM port created by my USB card reader. > Long > > story short, it doesn't work with the official Comm API from Sun. Since it > > work beautifully under Linux with the RXTX library, I was wondering if > this > > library could work well under Windows. > > > > Now if you are still interested, here is the whole story. > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > use it under Windows 2000. For my application, I need to access the COM > > port directly, without going through PCSC or another interface. The > > documentation states that this is possible: the driver shoud create a > > "virtual COM port" for me to use, if PCSC is disabled. > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > API and it seems to working well with a serial reader. > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > COM3 and the PCSC driver is not running. > > > > But when I try connect to the port from Java, I got a this message: > > > > No such Port COM: COM3 > > > > I think that the problem is related to the fact that the Comm API > > enumerates only the serial port recorded in the registry (it's in the FAQ > > for the Comm API). > > > > If I add a key for COM3 in the registry at > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > instead: > > > > Port COM COM3 is already used. > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > either. > > > >Hyperterminal does not work? hmm. > >Can you verify that the USB is working with this w32 at all? > >When RXTX enumerates ports, it tries to open the port and does a timed out >read. If the OS does not complain (No such port for instance) then the >port is taken to be good. > >You can force the enumeration to accept port 3 in SerialImp.c with >something like (replace the function currently there): > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > JNIEnv *env, > jobject jobj, > jstring tty_name, > jint port_type >) >{ > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > if( !strcmp( name, "COM3" ) > { > printf("%s is good\n",name); > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_TRUE ); > } > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > return( JNI_FALSE ); >} > >It would be random chance if rxtx did things the same way Sun does on w32. >If you do use rxtx on w32 you want to use 2.1-7pre16 > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > >These are in package gnu.io so remove all previous packages before trying >it. Conflicts are common. Just change the code in your file to use >package gnu.io and it should work. -- except you say hyperterm is not >working... >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:22:22 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:22:22 +0100 (BST) Subject: SOLVEDRe: [Rxtx] Towitoko USB reader under Windows In-Reply-To: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> References: <5.2.0.9.0.20030827095638.02a3dee0@mail.trusted-logic.fr> Message-ID: Great David. The w32 builds are ugly. The libmex is a library from an external project for debugging. I removed the link since its only useful there. I dont know the details of the Towitoko reader but it may well be possible that rxtx supports your work on Mac OS X too. There are binaries prebuilt in the source. Solaris is also tested. On Wed, 27 Aug 2003, David Garnier wrote: > Thanks Trent, but the problem was elsewhere. > > The solution is simple: do not use the Towitoko drivers at all, they do not > allow you to access the COM port. Instead, uninstall this driver and > install the drivers for the PL2303 chip inside the reader. These drivers > are available other there: > http://tech.prolific.com.tw/visitor/v_filebrw_result.asp > > > With these drivers I can connect to the USB reader just like a serial > reader, through COM3. > > I now have a single Java class that can communicate with any Towitoko > driver, serial or USB, Linux or Windows, without a single change. That's > portability! > > Anyway, I also manage to compile the RXTX library under Windows. That > wasn't really straightforward, but it worked in the end. For example, in > the makefile, there is a rule for a libmex.dll and make throws an error. I > don't think that its related to RXTX since I could not find this lib anywhere. > > Best Regards, > David Garnier > > At 18:56 26/08/2003 +0100, you wrote: > > > >On Tue, 26 Aug 2003, David Garnier wrote: > > > > > Hello, > > > > > > I have a problem accessing the COM port created by my USB card reader. > > Long > > > story short, it doesn't work with the official Comm API from Sun. Since it > > > work beautifully under Linux with the RXTX library, I was wondering if > > this > > > library could work well under Windows. > > > > > > Now if you are still interested, here is the whole story. > > > > > > I have a Towitoko Chipdrive micro 130 (hence USB interface) and I want to > > > use it under Windows 2000. For my application, I need to access the COM > > > port directly, without going through PCSC or another interface. The > > > documentation states that this is possible: the driver shoud create a > > > "virtual COM port" for me to use, if PCSC is disabled. > > > > > > Furthermore, I need to do this under Java. I have installed the Java Comm > > > API and it seems to working well with a serial reader. > > > > > > According to the Chipdrive Diagnostic software, the reader is attached to > > > COM3 and the PCSC driver is not running. > > > > > > But when I try connect to the port from Java, I got a this message: > > > > > > No such Port COM: COM3 > > > > > > I think that the problem is related to the fact that the Comm API > > > enumerates only the serial port recorded in the registry (it's in the FAQ > > > for the Comm API). > > > > > > If I add a key for COM3 in the registry at > > > HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM, I get this message > > instead: > > > > > > Port COM COM3 is already used. > > > > > > I tried to connect to the port using Hyperterminal and it didn't worked > > > either. > > > > > > >Hyperterminal does not work? hmm. > > > >Can you verify that the USB is working with this w32 at all? > > > >When RXTX enumerates ports, it tries to open the port and does a timed out > >read. If the OS does not complain (No such port for instance) then the > >port is taken to be good. > > > >You can force the enumeration to accept port 3 in SerialImp.c with > >something like (replace the function currently there): > > > >JNIEXPORT jboolean JNICALL RXTXCommDriver(testRead)( > > JNIEnv *env, > > jobject jobj, > > jstring tty_name, > > jint port_type > >) > >{ > > > > const char *name = (*env)->GetStringUTFChars(env, tty_name, 0); > > if( !strcmp( name, "COM3" ) > > { > > printf("%s is good\n",name); > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_TRUE ); > > } > > (*env)->ReleaseStringUTFChars( env, tty_name, name ); > > return( JNI_FALSE ); > >} > > > >It would be random chance if rxtx did things the same way Sun does on w32. > >If you do use rxtx on w32 you want to use 2.1-7pre16 > > > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz > >ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ > > > >These are in package gnu.io so remove all previous packages before trying > >it. Conflicts are common. Just change the code in your file to use > >package gnu.io and it should work. -- except you say hyperterm is not > >working... > >_______________________________________________ > >Rxtx mailing list > >Rxtx at linuxgrrls.org > >http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Wed Aug 27 02:23:26 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:23:26 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030826235814.10900.qmail@web13907.mail.yahoo.com> Message-ID: the board you describe is a converter from 422 to 485. you need a converter from 232 to 485, since your pc will have 232 (standard serial port). 422 is a different flavour of 485, being the main difference that it uses 4 wires and is full duplex. if you want to go with 485.com you must buy one marked with RS232<=>RS485 in their catalog. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 27 de Agosto de 2003 0:58 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the explanations. Just one more thing I would like to verify with you, just to make sure I've understood correctly: I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? Thanks, Piero Ricardo Trindade wrote: Hi, Yes, you can build a protocol on top of a converter + rxtx. You just treat the 485 port as if it were 232. You will have to deal with some kind of token passing (a la token ring), to decide who has the right to write to the bus. (at least this is how I read about it), since you should never have two devices writing to the bus at once. In some older equips I read in the manual that this could even damage the hardware (probably not true anymore...). ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: segunda-feira, 25 de Agosto de 2003 13:24 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi Ricardo, Thanks for the advice regarding the 232->485 converter. Regarding the API, I can clarify a little bit what I meant. Since we intend to build a peer-to-peer protocol over RS-485 (i.e., Bacnet MS/TP), what I was looking to understand is whether I can use an API such as RXTX in combination with the 232->485 converter to implement this peer-to-peer protocol. What I understand is that this should be OK as long as I keep in mind that 232 is full-duplex whereas the 485 is half-duplex (in the typical 2 wire configuration). Do you agree? Thanks, Piero Ricardo Trindade wrote: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------------------------------------------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030827/72951476/attachment-0005.html From ricardo.trindade at emation.pt Wed Aug 27 02:26:13 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Wed, 27 Aug 2003 09:26:13 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: actually there was a mistake in the original post, it wasn't a board, it was a 422-485 converter. Piero : When you say board we assume something you insert in a isa or pci slot of you pc. (at least I do). -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: quarta-feira, 27 de Agosto de 2003 5:14 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support On Tue, 26 Aug 2003, Piero Colagrosso wrote: > Hi Ricardo, > > Thanks for the explanations. > > Just one more thing I would like to verify with you, just to make sure I've understood correctly: > > I'm aware that there are also some RS-485 boards that also do the automatic transmit control in hardware (e.g., http://www.rs485.com/prsfc44t.html). Would I get the same advantage with this type of board as with the RS232->RS485 you mentioned in your initial response? Also, from an RXTX point of view could I still treat this RS-485 port as if it were an RS-232 port? > > Thanks, Piero: So far as I know, the RS485 boards have not been tested with rxtx. They should behave like other tty drivers and any missing functionality _should_ be handled in rxtx. While very possible, you may end up tinkering with the native code before the internal RS485 boards work. As a quick hack to test them, you could make say /dev/ttyS32 a symbolic link to whatever the kernel expects the port to be at. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 27 02:45:59 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 27 Aug 2003 09:45:59 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: References: Message-ID: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From Scott.Hughes at dalsemi.com Wed Aug 27 11:26:15 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Wed, 27 Aug 2003 12:26:15 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> > So far, I've just been watching the 1.4 JRE and recommending > 1.3 JRE. > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > untested currently. The big change in Java since the initial > tests was > the NPTL on Linux. Can you think of any reason that 2.1-6 would work in that same jre 1.4 environment and 2.1-7pre16 wouldn't? Also, I noticed that even though I remove any event listeners and explicitly close the port, that MonitorThread still hangs around. Any of the 1-Wire examples we have that don't call System.exit end up hanging on that thread. Any idea what I might be doing wrong there? And lastly, I always get these "stale lock file" messages. Is that related to the above problem? And on another, completely different subject, I'm trying to build 2.1.6 with mingw32 from cygwin. Does anyone have an updated build script or makefile that works in this scenario. I noticed the current makefile is expecting a DOS environment. I went through and replaced all the "\\" with "/" and any dos specific command (i.e. xcopy) with it's unixy equivalent... But I still can't make it all the way through. Thanks for your help! Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From david.garnier at trusted-logic.com Wed Aug 27 11:31:55 2003 From: david.garnier at trusted-logic.com (David Garnier) Date: Wed, 27 Aug 2003 19:31:55 +0200 Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.c om> Message-ID: <5.2.0.9.0.20030827192957.02a92998@mail.trusted-logic.fr> You can have mine. It works under win2k with the last version of mingw. Don't forget to run ./configure in the top directory first. Best Regards, David Garnier At 12:26 27/08/2003 -0500, you wrote: > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > >Can you think of any reason that 2.1-6 would work in that same jre 1.4 >environment and 2.1-7pre16 wouldn't? > >Also, I noticed that even though I remove any event listeners and explicitly >close the port, that MonitorThread still hangs around. Any of the 1-Wire >examples we have that don't call System.exit end up hanging on that thread. >Any idea what I might be doing wrong there? > >And lastly, I always get these "stale lock file" messages. Is that related >to the above problem? > >And on another, completely different subject, I'm trying to build 2.1.6 with >mingw32 from cygwin. Does anyone have an updated build script or makefile >that works in this scenario. I noticed the current makefile is expecting a >DOS environment. I went through and replaced all the "\\" with "/" and any >dos specific command (i.e. xcopy) with it's unixy equivalent... But I still >can't make it all the way through. > >Thanks for your help! > >Scott >-- >Scott Hughes - Engineer >shughes aht dalsemi daut com >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://hex.linuxgrrls.org/mailman/listinfo/rxtx -------------- next part -------------- #------------------------------------------------------------------------- # rxtx is a native interface to serial ports in java. # Copyright 1997-2002 by Trent Jarvi taj at www.linux.org.uk. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #------------------------------------------------------------------------- # This Makefile works on windows 98/NT with mingw32 in a DOS shell # One catch. We cant figure out how to generate .def files with default # DOS tools and mingw32. Install Cygwin if you are adding/removing/chaninging # C functions. # mingw build tools are used # PATH=c:\mingw\bin;c:\jdk118\bin;%PATH% # mingw32 version 1.0.1-20010726 # jdk was 1.1.8 # java.sun.com ###################### # user defined variables ###################### # path to the source code (directory with SerialImp.c) Unix style path SRC=../src # and the dos path DOSSRC=..\\\src # path to the jdk directory that has include, bin, lib, ... Unix style path JDKHOME=C:/j2sdk1.4.2_01 #path to mingw32 MINGHOME="C:/MinGW" # path to install RXTXcomm.jar DOS style path COMMINSTALL="C:\j2sdk1.4.2_01\lib" # path to install the shared libraries DOS style path LIBINSTALL="C:\j2sdk1.4.2_01\bin" # path to the mingw32 libraries (directory with libmingw32.a) DOS style path LIBDIR="C:\MinGW\lib" ###################### # End of user defined variables ###################### ###################### # Tools ###################### AS=as CC=gcc LD=ld DLLTOOL=dlltool # this looks like a nice tool but I was not able to get symbols in the dll. DLLWRAP=dllwrap CLASSPATH=-classpath ".;" #C:\jdk13\lib\RXTXcomm.jar;c:\BlackBox.jar;c:\jdk13\lib\classes.zip" JAVAH=javah $(CLASSPATH) JAR=jar JAVAC=javac $(CLASSPATH) ###################### # Tool Flags ###################### CFLAGS_CYGWIN= -O2 $(INCLUDE) -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall #CFLAGS= -O2 $(INCLUDE) -mno-cygwin -DWIN32 -D __int64="long long" -mno-fp-ret-in-387 -Wall -D TRENT_IS_HERE_DEBUGGING_ENUMERATION -DTRENT_IS_HERE_DEBUGGING_THREADS INCLUDE= -I c:\matlab6p5/extern/include/ -I . -I $(JDKINCLUDE) -I $(JDKINCLUDE)/win32 -I $(SRC) -I include -I $(MINGINCLUDE) JAVAHFLAGS= -jni -d include LIBS=-L . -L $(LIBDIR) -LC:/tmp/rxtx5/build -luser32 -lgdi32 -lcomdlg32 -lkernel32 -ladvapi32 -lmoldname -lcrtdll # -lmex # path to the java native interface headers (directory with jni.h) JDKINCLUDE=$(JDKHOME)/include MINGINCLUDE=$(MINGHOME)/include JAVAFILES = $(wildcard $(SRC)/*.java) CFILES=$(wildcard $(SRC)/*.c) $(wildcard $(SRC)/*.cc) TARGETLIBS= rxtxSerial.dll rxtxParallel.dll #TARGETLIBS= rxtxSerial.dll rxtxParallel.dll rxtxZystem.dll DLLOBJECTS= fixup.o SerialImp.o termios.o init.o fuserImp.o PARALLELOBJECTS= ParallelImp.o termios.o init.o all: $(TARGETLIBS) # rebuild rebuild will force everything to be built. rebuild: rm -rf gnu include RXTXcomm.jar Serial.* rxtxSerial.* * *.O.o *.O gnutimestamp include: mkdir include gnu: mkdir gnu mkdir gnu\\\io # yayaya We should have put the files in gnu.io to start with gnutimestamp: $(JAVAFILES) $(CFILES) include gnu xcopy $(DOSSRC)\\*.* gnu\\io\\ echo > gnutimestamp # FIXME make 3.79.1 behaves really strage if we use %.o rules. init.o: $(CC) $(CFLAGS) -c $(SRC)/init.cc -o init.o fixup.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o fixup.o #ZystemImp.o: include/config.h # $(CC) $(CFLAGS_CYGWIN) -c $(SRC)/ZystemImp.c -o ZystemImp.o SerialImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/SerialImp.c -o SerialImp.o fuserImp.o: $(CC) $(CFLAGS) -c $(SRC)/fuserImp.c -o fuserImp.o termios.o: $(CC) $(CFLAGS) -c $(SRC)/$*.c -o termios.o ParallelImp.o: include/config.h $(CC) $(CFLAGS) -c $(SRC)/$*.c -o ParallelImp.o # This file is a pain in the rear to generate. If your looking at this you # need to install cygwin. #$(SRC)/Zystem.def: $(DLLOBJECTS) ZystemImp.o #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #xcopy /Y $(DOSSRC)\\Zystem.def gnu\\io\\ $(SRC)/Serial.def: $(DLLOBJECTS) $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Serial.def gnu\\io\\ # echo EXPORTS >$(SRC)/Serial.def;for i in `nm rxtxSerial.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Serial.def $(SRC)/Parallel.def: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 xcopy $(DOSSRC)\\Parallel.def gnu\\io\\ # echo EXPORTS >$(SRC)/Parallel.def;for i in `nm rxtxParallel.dll | grep "T _Java"|cut -b 13-`;do echo -n $$i|sed s#@.*##;echo "="$$i;done >> $(SRC)/Parallel.def rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) #ZystemImp.o $(SRC)/Zystem.def gcc -c -DBUILDING_DLL=1 -D_DLL=1 -I. -Ic:/jdk13/include -Ic:/jdk13/include/win32 -Wall -O2 -D __int64="long long" -o ZystemImp.o $(SRC)/ZystemImp.c dllwrap --verbose --no-default-excludes --export-all-symbols --output-exp Zystem.exp --output-def Zystem.def --add-stdcall-alias --driver-name gcc -o rxtxZystem.dll ZystemImp.o libmex.dll -Wl,-e,__cygwin_noncygwin_dll_entry at 12 -s #rxtxZystem.dll: RXTXcomm.jar $(DLLOBJECTS) ZystemImp.o $(SRC)/Zystem.def #$(LD) --base-file Zystem.base --dll -o rxtxZystem.dll $(DLLOBJECTS) \ #ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 #$(DLLTOOL) --as=$(AS) --dllname rxtxZystem.dll --def $(SRC)/Zystem.def \ #--base-file Zystem.base --output-exp Zystem.exp #$(LD) --base-file Zystem.base Zystem.exp -dll -o rxtxZystem.dll \ #$(DLLOBJECTS) ZystemImp.o _divdi3.o $(LIBS) -lcygwin -e _dll_entry at 12 rxtxSerial.dll: RXTXcomm.jar $(DLLOBJECTS) $(SRC)/Serial.def $(LD) --base-file Serial.base --dll -o rxtxSerial.dll $(DLLOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxSerial.dll --def $(SRC)/Serial.def \ --base-file Serial.base --output-exp Serial.exp $(LD) --base-file Serial.base Serial.exp -dll -o rxtxSerial.dll \ $(DLLOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 # # This should replace the mess above if it worked. # nm shows no symbols in the dll produced. The old stuff above works ok. # $(DLLWRAP) --output-def $*.def --output-exp $*.exp \ # --add-stdcall-alias --driver-name gcc -mwindows \ # --target=i386-mingw32 -o $*.dll $(DLLOBJECTS) $(LIBS) -s # -mno-cygwin rxtxParallel.dll: $(PARALLELOBJECTS) $(LD) --base-file Parallel.base --dll -o rxtxParallel.dll $(PARALLELOBJECTS) \ $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 $(DLLTOOL) --as=$(AS) --dllname rxtxParallel.dll --def $(SRC)/Parallel.def \ --base-file Parallel.base --output-exp Parallel.exp $(LD) --base-file Parallel.base Parallel.exp -dll -o rxtxParallel.dll \ $(PARALLELOBJECTS) $(LIBS) -lmingw32 -e _dll_entry at 12 RXTXcomm.jar: gnutimestamp $(JAVAC) gnu\\io\\*.java $(JAR) -cf RXTXcomm.jar gnu\\io\\*.class $(JAVAH) $(JAVAHFLAGS) $(patsubst gnu/io/%.java,gnu.io.%,$(wildcard gnu/io/*.java)) include/config.h: gnutimestamp echo "#define HAVE_FCNTL_H 1" > include\\\config.h echo "#define HAVE_SIGNAL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FCNTL_H 1" >> include\\\config.h echo "#define HAVE_SYS_FILE_H 1" >> include\\\config.h echo "#undef HAVE_SYS_SIGNAL_H" >> include\\\config.h echo "#undef HAVE_TERMIOS_H" >> include\\\config.h install: all xcopy RXTXcomm.jar $(COMMINSTALL) xcopy RXTXcomm.jar "e:\matlab~1\java\jarext\commapi\win32" xcopy $(TARGETLIBS) $(LIBINSTALL) xcopy $(TARGETLIBS) "e:\matlab~1\bin\win32" uninstall: del $(COMMINSTALL)\\\RXTXcomm.jar del $(LIBINSTALL)\\\$(TARGETLIBS) clean: deltree gnu\\\io\\\*.* deltree include del Serial.* gnutimestamp *.o *.O RXTXcomm.jar rxtxSerial.* From taj at linuxgrrls.org Wed Aug 27 20:45:40 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 03:45:40 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEB7F2@misnts1.dalsemi.com> Message-ID: Hi Scott. hmm lots of questions here. On Wed, 27 Aug 2003, Scott Hughes wrote: > > > So far, I've just been watching the 1.4 JRE and recommending > > 1.3 JRE. > > Some QA suites where run on early 1.4 but the 1.4 JRE's are mostly > > untested currently. The big change in Java since the initial > > tests was > > the NPTL on Linux. > > Can you think of any reason that 2.1-6 would work in that same jre 1.4 > environment and 2.1-7pre16 wouldn't? hmm. This is a great observation. I'm going on a bike ride across the rockies friday so I'll be out about a week but this does offer a means to get around or isolate what is going on. As I mentioned, I've had limited testing with 1.4 jre's but I should be able to track theis down with the above. > > Also, I noticed that even though I remove any event listeners and explicitly > close the port, that MonitorThread still hangs around. Any of the 1-Wire > examples we have that don't call System.exit end up hanging on that thread. > Any idea what I might be doing wrong there? > This is a known bug with a workoround for in rxtx. We need to move code around in rxtx for the above to work. What you want to do for now is the following: open() add event Listener close() [close shuts down the event listener] If you call close without an event listener, rxtx will sit there waiting for the event listener to shut down (deadlock). This is something I've been intending to fix but constantly get pulled into other things. > And lastly, I always get these "stale lock file" messages. Is that related > to the above problem? > If you do not call close, the lock file will remain and be recognized as stale the next time an application tries to use the post. see below. When I put the lock file code in, I assumed finalize() would be called and removed lockfiles there but it turns out that is not the case. > And on another, completely different subject, I'm trying to build 2.1.6 with > mingw32 from cygwin. Does anyone have an updated build script or makefile > that works in this scenario. I noticed the current makefile is expecting a > DOS environment. I went through and replaced all the "\\" with "/" and any > dos specific command (i.e. xcopy) with it's unixy equivalent... But I still > can't make it all the way through. > > Thanks for your help! > w32 builds.. cygwin: I have not had luck with the cygwin version of mingw32 in ages. even if I do install cygwin tools (especially grep and sed) I place the real mingw32 in the front of my path and just blow off the cygwin gcc/mingw32. http://www.mingw.org/ If you do want to build in a cygwin bash shell, I think configure will still work. Its really been ages though. You only need a few tools to build rxtx on w32. I've always used just a few tools from cygwin and mingw in dos shells for other reasons. 1) there is no confusion that rxtx is not linking against cygwin.dll thus rendering rxtx GPL vs LGPL. 2) w32 for me is a vmware instance with very limited resources. In fact I usually use a gcc cross compiler for win32 and have test applications, rxtx, ... smb shared from a linux box. This way I can test each w32 by just clicking on the vmware instance in question and have it autorun tests. No need for multiple source trees or multiple installs. From pcolagrosso at yahoo.com Thu Aug 28 09:18:31 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Thu, 28 Aug 2003 08:18:31 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Just one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030828/9b501055/attachment-0005.html From taj at linuxgrrls.org Thu Aug 28 10:05:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 28 Aug 2003 17:05:26 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> References: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: Hi Piero As I mentioned, I have little experience with RS485. I asked around a bit and learned that Arcom does make boards that work under linux. Lets just say there was mumbling and grumbling between breaths on the subject of internal RS485 boards in general. I've got one more person to ask but thats probably going to be about all I can find. On Thu, 28 Aug 2003, Piero Colagrosso wrote: > Hi guys, > > Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. > > A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. > > We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. > > However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. > > Thanks, > > Piero > > > > > > Trent Jarvi wrote: > > > Thanks Ricardo > > Yes I assumed an internal pci or isa board when I read 'board.' > > On Wed, 27 Aug 2003, Ricardo Trindade wrote: > > > actually there was a mistake in the original post, it wasn't a board, it was > > a 422-485 converter. > > > > Piero : When you say board we assume something you insert in a isa or pci > > slot of you pc. (at least I do). > > > > -----Mensagem original----- > > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > > nome de Trent Jarvi > > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > > Para: Java RXTX discussion > > Assunto: RE: [Rxtx] RS-485 Support > > > > > > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > > > Hi Ricardo, > > > > > > Thanks for the explanations. > > > > > > Just one more thing I would like to verify with you, just to make sure > > I've understood correctly: > > > > > > I'm aware that there are also some RS-485 boards that also do the > > automatic transmit control in hardware (e.g., > > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > > this type of board as with the RS232->RS485 you mentioned in your initial > > response? Also, from an RXTX point of view could I still treat this RS-485 > > port as if it were an RS-232 port? > > > > > > Thanks, > > > > > > Piero: > > > > So far as I know, the RS485 boards have not been tested with rxtx. They > > should behave like other tty drivers and any missing functionality > > _should_ be handled in rxtx. > > > > While very possible, you may end up tinkering with the native code before > > the internal RS485 boards work. As a quick hack to test them, you could > > make say /dev/ttyS32 a symbolic link to whatever the kernel expects the > > port to be at. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > --------------------------------- > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software From Scott.Hughes at dalsemi.com Thu Aug 28 14:18:29 2003 From: Scott.Hughes at dalsemi.com (Scott Hughes) Date: Thu, 28 Aug 2003 15:18:29 -0500 Subject: [Rxtx] Building 2.1.x from source Message-ID: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Trent, > In fact I usually use a gcc cross > compiler for win32 and have test applications, rxtx, ... smb > shared from a > linux box. This way I can test each w32 by just clicking on > the vmware > instance in question and have it autorun tests. No need for multiple > source trees or multiple installs. Is the process for cross-compiling rxtx documented anywhere? Or should I just pick up a tutorial on cross-compiling in general? It's new territory for me. I just tried it on my debian system. Here's pretty much what I did: apt-get install mingw32 ./configure --target=i586-mingw32msvc --host=i686-pc-linux --build=i586-mingw32msvc make But that didn't actually get me a dll... Nor did it get me any lib*.so files, so I must be close. I then tried: make i586-mingw32msvc/rxtxSerial.dll And that came back with the error "cannot execute cpp0". I tried changing all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get that some headers are missing (the exact same errors I got when I tried to use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, sys/signal.h. Any ideas? Scott -- Scott Hughes - Engineer shughes aht dalsemi daut com From ricardo.trindade at emation.pt Thu Aug 28 17:02:11 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Fri, 29 Aug 2003 00:02:11 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030828151831.5737.qmail@web13907.mail.yahoo.com> Message-ID: The site doesn't state wether the board handles automatic send data control. most bb equipment does, but be sure to check with them. believe me, you want a board/converter that has hw sdc. About linux support, ask them. If you can get a tty in linux it should work fine. -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quinta-feira, 28 de Agosto de 2003 16:19 Para: Java RXTX discussion Assunto: RE: [Rxtx] RS-485 Support Hi guys, Thanks for pointing out the error. Yes, I meant an internal PCI RS-485 board, so the example I sent was incorrect. A better example would have been the 422/485 board manufactured by Quatech and also distributed by B&B (http://www.bb-elec.com/product.asp?sku=QSC-200/300&PathId=593). This board provides four indpendendent serial ports. We are considering the use of internal 485 boards because our system will require multiple (at least 2) 485 network connections. Since most PC chipsets come with a single RS-232 serial connection, using an internal RS-485 multiport PCI board seems to be the best and most cost effective alternative for supporting 2 or more ports. However, on the application software side we are also assessing the effort involved in interfacing with this type of board on an Linux system. This is why we are investigating RXTX as a solution for interfacing with this (or another) RS-485 board. Thanks, Piero Trent Jarvi wrote: Thanks Ricardo Yes I assumed an internal pci or isa board when I read 'board.' On Wed, 27 Aug 2003, Ricardo Trindade wrote: > actually there was a mistake in the original post, it wasn't a board, it was > a 422-485 converter. > > Piero : When you say board we assume something you insert in a isa or pci > slot of you pc. (at least I do). > > -----Mensagem original----- > De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em > nome de Trent Jarvi > Enviada: quarta-feira, 27 de Agosto de 2003 5:14 > Para: Java RXTX discussion > Assunto: RE: [Rxtx] RS-485 Support > > > > > On Tue, 26 Aug 2003, Piero Colagrosso wrote: > > > Hi Ricardo, > > > > Thanks for the explanations. > > > > Ju st one more thing I would like to verify with you, just to make sure > I've understood correctly: > > > > I'm aware that there are also some RS-485 boards that also do the > automatic transmit control in hardware (e.g., > http://www.rs485.com/prsfc44t.html). Would I get the same advantage with > this type of board as with the RS232->RS485 you mentioned in your initial > response? Also, from an RXTX point of view could I still treat this RS-485 > port as if it were an RS-232 port? > > > > Thanks, > > > Piero: > > So far as I know, the RS485 boards have not been tested with rxtx. They > should behave like other tty drivers and any missing functionality > _should_ be handled in rxtx. > > While very possible, you may end up tinkering with the native code before > the internal RS485 boards work. As a quick hack to test them, you could > make sa y /dev/ttyS32 a symbolic link to whatever the kernel expects the > port to be at. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030829/1bab8f24/attachment-0005.html From taj at linuxgrrls.org Thu Aug 28 18:08:05 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 01:08:05 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: I have this documented somewhat in INSTALL if you look for ----------------- cross-compiling from Linux ----------------- Getting into building cross-compilers is probably something you dont even want to hear about but there are links to prebuilt cross compilers in the INSTALL documentation. Once installed you just do something like the following: mkdir build cd build ../configure --target=i386-mingw32 --host=i386-redhat-linux make Then I usually just write a small script to perform install into the SMB tree. On Thu, 28 Aug 2003, Scott Hughes wrote: > Trent, > > > In fact I usually use a gcc cross > > compiler for win32 and have test applications, rxtx, ... smb > > shared from a > > linux box. This way I can test each w32 by just clicking on > > the vmware > > instance in question and have it autorun tests. No need for multiple > > source trees or multiple installs. > > Is the process for cross-compiling rxtx documented anywhere? Or should I > just pick up a tutorial on cross-compiling in general? It's new territory > for me. > > I just tried it on my debian system. Here's pretty much what I did: > > apt-get install mingw32 > ./configure --target=i586-mingw32msvc --host=i686-pc-linux > --build=i586-mingw32msvc > make > > But that didn't actually get me a dll... Nor did it get me any lib*.so > files, so I must be close. I then tried: > > make i586-mingw32msvc/rxtxSerial.dll > > And that came back with the error "cannot execute cpp0". I tried changing > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > that some headers are missing (the exact same errors I got when I tried to > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > sys/signal.h. > > Any ideas? > > Scott > -- > Scott Hughes - Engineer > shughes aht dalsemi daut com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Thu Aug 28 20:22:34 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:22:34 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: On Fri, 29 Aug 2003, Trent Jarvi wrote: > > And that came back with the error "cannot execute cpp0". I tried changing > > all the calls to "gcc" under that target to "i586-mingw32msvc-gcc" and I get > > that some headers are missing (the exact same errors I got when I tried to > > use mingw32 on WinXP to compile the dll). Missing pwd.h, grp.h, > > sys/signal.h. > > > > Any ideas? > > > > Scott I'm not familiar with debians packages but often the packages get installed in /usr/local/bin. That directory should be at the front of your path so gcc can know it has the cross-compiler. If nothing else I can give you a ssh account on my box later next week. From taj at linuxgrrls.org Thu Aug 28 20:25:52 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 29 Aug 2003 03:25:52 +0100 (BST) Subject: [Rxtx] Building 2.1.x from source In-Reply-To: References: <1809DA15308DD51180EE00508BCF219414FEBA63@misnts1.dalsemi.com> Message-ID: Here is the script I use to build w32 on linux. rm -f config.cache config.h config.status export WIN32INCLUDE=/home/bob/win32-include export PATH=/usr/local/cross-tools/i386-mingw32/bin/:/bin:/usr/bin:/usr/local/jd k1.2/bin/: ../configure --target=i386-mingw32 --host=i386-pc-linux --build=i386-mingw32 make WIN32INCLUDE contains the Java include files ls ../win32-include/ jni.h jvmdi.h jvmpi.h win32 /usr/local/cross-tool/mingw32 is just the cross compiler linked to in INSTALL. From reggiehg_t at yahoo.com Sat Aug 30 01:07:01 2003 From: reggiehg_t at yahoo.com (Reggie Guevara) Date: Sat, 30 Aug 2003 00:07:01 -0700 (PDT) Subject: [Rxtx] rxtx archives In-Reply-To: <3F463018.7070102@gmx.ch> Message-ID: <20030830070701.41687.qmail@web80606.mail.yahoo.com> Hi, I get a "404 Not Found" surfing http://hex.linuxgrrls.org/pipermail/rxtx/ Any alternatives? TIA, Reggie __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From taj at linuxgrrls.org Fri Aug 1 10:44:17 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Fri, 1 Aug 2003 17:44:17 +0100 (BST) Subject: [Rxtx] Application working under linux and OSX, problems with same code on Windows In-Reply-To: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> References: <5.1.1.6.0.20030730093658.00b3e3c8@magiclamp.org> Message-ID: On Wed, 30 Jul 2003, Mary Pietrowicz wrote: > Hi, > > I've been using rxtx 2.1.x to talk to RFID readers in Linux and OSX > environments. I would like to use rxtx 2.1 with my application (same code) > on Windows. I have also run the my app successfully on Windows with Sun's > comm package, but I would like to keep a common code base and use > rxtx. Here is what I have tried sofar to get things running with rxtx on > windows (below). Any help would be greatly appreciated! > > Attempted to build 2.1.6 with lcc (one of the build options in the > installation instructions). Could not get a successful compile. > > When I noticed that all of the Windows prereleases had been built with > mingw, I switched to those build tools and installed MinGW at -3.0.0-rc3, > gcj-3.2-20021210-1, MSYS-1.0.10-rc-1. > > I'm using jdk1.4.1-b21. No comm.jar in lib\ext. :-) > > I'm running Windows XP. > > I attempted to build rxtx 2.1.6 from within cygwin, since that is what I > already had in my Windows environment. Makefile is attached. In my first > build attempt (ran make per instructions), I got > ../src/SerialImp.c:22:20:config.h: No such file or directory. Then, I did > a "make include/config.h" to produce the config.h file. > > At the next attempt, the libgcj-config file could not be found. I copied > d:\mingw > lib\gcc-lib\mingw32\3.2\include\gcj\libgcj-config.h to d:\mingw\include\gcj > where it could be found. I ran "make", no errors. Then I did a "make > install". The build process asked to copy *.c and *.java files back into > .../build/gnu/io, compiled everything again, overwrote Serial.def again, > and then copied out RXTXcomm.jar and rxtxSerial.dll. No errors. I rebuilt > my java source, and ran it from the DOS shell. I got the following runtime > error: > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D401C0E > Function=JVM_RegisterUnsafeMethods+0x18C > Library=d:\j2sdk1.4.1\jre\bin\client\jvm.dll > > Current Java thread: > at gnu.io.RXTXCommDriver.nativeGetVersion(Native Method) > at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:56) > at java.lang.Class.forName0 > at Java.lang.Class.forName(Class.java:140) > at gnu.io.CommPortIdentifier(CommPortIdentifier.java:67) > .... Stack trace calls from my code from here > > Error file hs_err_pid2244.log is attached. > > I thought I might have better luck building from the MSYS shell using the > same Makefile. So, I cleaned everything out, and did a "make > include/config.h", a "make", and a "make install". I got a build - no > errors - rebuilt my code again from scratch, and ran it from the DOS > shell. I got a related runtime error: > java.lang.UnsatisfiedLinkError: nativeGetVersion thrown while loading > gnu.io.RXTXCommDriver > > I also tried the prebuilt prerelease. > > (From ~/jarvi/rxtx//download/prerelease/2.1) > I installed RXTXcomm.jar, rxtxParallel.dll, rxtxSerial.dll) > I tried to run it, and when it complained about missing Zsystem libraries, > I snagged the Zsystem-0.0-1.tar.gz and dropped Zsystem.jar into > jre\lib\ext. I rebuilt all my stuff, and tried to run again. > At run time, it confirmed the version: > Native lib Version = RXTX-2.1-7pre12 > Java lib Version = RXTX-2.1-7pre12 > > At the point where I wrote to the serial port, and listened for a response > from the device, I got: > Error reading from the serial port: No error in readArray > java.io.IOException: No error in readArray > at gnu.io.RXTXPort.readArray(Native Method) > at gnu.io.RXTXPort$SerialInputStream.read(RXTXPort.java:1296) > at gnu.io.BufferedInputStream.fill(BufferedInputStream.java:183) > at java.io.BufferedInputStream.read1(BufferedInputStream.java:222) > at java.io.BufferedInputStream.read(BufferedInputStream.java:277) > at java.io.FilterInputStream.read(FilterInputStream.java:90) > ... Rest is stack trace of my code > > Does anyone have any thoughts? > Hi Mary Wow. You made it very far in the w32 build but didnt get a working library. I'm very impressed you made it this far. thoughts... In short, w32 builds are yucky :) What I usually do to build w32 ( this will probably be your best bet ) is install mingw from the from the mingw site. I also had bad binaries show up if I used the cygwin 'easy install' mingw binaries. I also install the cygwin easy install for things like sed, grep, vim (or emacs)... Sometimes I dont actually install but just samba share the build tools. I think this causes problems with makefiles and escape "\" characters. With the tools installed I make sure no gcc, ld, asm can be called from cygwin and put mingw at the front of the PATH. with the following you can check out the last rxtx built on w32: CVSROOT=:pserver:anonymous at cvs.milestonesolutions.com:/usr/local/cvsroot (use whatever to set the variable in the shell you are using) using password mousy cvs login then checkout rxtx-2.1-7pre16 checkout -r commapi-0-0-1 rxtx-devel using the mingw32 makefile, things should build. cross compiling has worked in the past but since there are some test suites on w32 under NDA, I just build mingw32 on w32. lcc has built in the past but the makefile and code may not be in sync with lcc. There would probably be some changes required. I have more thoughts on the other errors you see but lets just focus on this build for now if you dont mind. From taj at parcelfarce.linux.theplanet.co.uk Sat Aug 2 20:32:14 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Sun, 3 Aug 2003 03:32:14 +0100 (BST) Subject: [Rxtx] Re: Java Comm Serial API How-To for Linux In-Reply-To: Message-ID: On Sat, 2 Aug 2003, Webmaster wrote: > Trent, > > I have begun looking at the source code. I'm willing to make an attempt > at your list. As far as merging with 2.1, do you have a changelog > available to help me determine which files have changed, and/or which > files need to be merged? > Hi Wade The files of concern will be SerialImp.c, termios.c, ParallelImp.c, RXTXPort.java and RXTXCommDriver.java (and RXTXVersion.java finger twirl). The safest way to start is to copy over rxtx 2.1 CVS files, add the license clause and fix javax/comm vs gnu/io. basically rxtx 2.1-7pre* was focused on some w32 bug reports for Serial and Parallel comm. So its not too interesting for Linux but there are some fixes in there. the ChangeLog file in CVS should contain the changes. I can help more there but I think its self explanitory. > As far as number 2 on the list goes, what is the clause? What is it that > HP needs? here is what I added for HP. Its rather trivial but their lawyers really wanted it in. This is how the fsf suggested to deal with it. If you read through the changes, you will see its just a polite modification. There was far too much lawyer time spent on this and I'd suggest not messing with it unless you find good reason. Then again, contributers have the last say. | The following has been added to allow RXTX to be distributed with Sun | Microsystem's CommAPI library as suggested by the FSF. | | http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface | | A program that contains no derivative of any portion of RXTX, but | is designed to work with RXTX by being compiled or linked with it, | is considered a "work that uses the Library" subject to the terms and | conditions of the GNU Lesser General Public License. | | As a special exception, the copyright holders of RXTX give you | permission to link RXTX with independent modules that communicate with | RXTX solely through the Sun Microsytems CommAPI interface, regardless of | the license terms of these independent modules, and to copy and distribute | the resulting combined work under terms of your choice, provided that | every copy of the combined work is accompanied by a complete copy of | the source code of RXTX (the version of RXTX used to produce the | combined work), being distributed under the terms of the GNU Lesser General | Public License plus this exception. An independent module is a | module which is not derived from or based on RXTX. | | Note that people who make modified versions of RXTX are not obligated | to grant this special exception for their modified versions; it is | their choice whether to do so. The GNU Lesser General Public License | gives permission to release a modified version without this exception; this | exception also makes it possible to release a modified version which | carries forward this exception. | > > If you can provide me with this information, I'd be willing to take a cut > at it. Wade: I really do appreciate you helping here. You may want to join the rxtx mail list to get more help. I'll be more than willing to help on or off the mail list. > > Wade > > > Hi Wade > > > > This would work well. I was asking on the rxtx mail list if anyone wanted > > to handle rxtx 2.0. What needs to happen is: > > > > 1) merge with rxtx 2.1 > > 2) maintain a clause in the rxtx 2.0 source for HP - fsf approved > > type changes. > > 3) compile the binaries. > > > > I can help if things get hard. I can also produce w32 binaries which is > > always 'interesting.' I'm sure some things will be difficult the first > > time through but easier later. > > > > I've been shown a patch from the kaffe group which merges rxtx 2.1 > > into kaffe as javax.comm. There are also discussions going on between > > classpath and kaffe. It should be OK license wise for them to do > > this. Kaffe should have something Aug 11th I'm told. > > > > You may want to check out all of your options before deciding which way to > > go. > > > > -- > > Trent Jarvi > > taj at www.linux.org.uk > > > -- Trent Jarvi taj at www.linux.org.uk From peck at advancen.com Mon Aug 4 01:49:20 2003 From: peck at advancen.com (Stephen Peck) Date: Mon, 04 Aug 2003 07:49:20 -0000 Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer Message-ID: <1059983527.11567.6.camel@charlie.stratlink.com.au> Hi, I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and are trying to connect to a port with several threads. When CommPortIdentifer.getPortIdentifer() is called on a port that is currently being used I recieve the message :- RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File exists The problem I am having is this port or method call actually throws a NoSuchPortException and therefore my thread never recieves a PortInUseException. Is there some other way I can achieve this ? From taj at linuxgrrls.org Mon Aug 4 02:44:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 09:44:14 +0100 (BST) Subject: [Rxtx] Question about lock files when retrieving CommPortIdentifer In-Reply-To: <1059983527.11567.6.camel@charlie.stratlink.com.au> References: <1059983527.11567.6.camel@charlie.stratlink.com.au> Message-ID: On Mon, 4 Aug 2003, Stephen Peck wrote: > Hi, > > I am using RxTx 1.4 on JDK 1.3 with the latest javax.comm package and > are trying to connect to a port with several threads. > > When CommPortIdentifer.getPortIdentifer() is called on a port that is > currently being used I recieve the message :- > > RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyS0: File > exists > > The problem I am having is this port or method call actually throws a > NoSuchPortException and therefore my thread never recieves a > PortInUseException. Is there some other way I can achieve this ? The way rxtx enumerates ports is if it cannot obtain a lock with lock files enabled the port will not be enumerated. There has been interest in having a workaround but nobody has coded it. Some possibilities include turning off lockfiles as a configure time option (with the accepted risk of what that involves) or using properties to specify the list of ports which bypasses enumeration. [Section S in INSTALL for rxtx 1.4]. For Linux, working out enumeration of locked ports is not so interesting long term because the kernel will be exposing all ports it enumerates in user space in future releases. This will simplify port enumeration significantly. >From what I can tell, the exception is actually comming from Sun's comm.jar. You could try modifying SerialImp.c to use lockfiles and still return ports in the enumerated list. The testRead() function is responsible for returning false and causing the port to fail to be enumerated. This happens when the port is locked: if ( LOCK( name, pid ) ) { (*env)->ReleaseStringUTFChars(env, tty_name, name); LEAVE( "RXTXPort:testRead no lock" ); return JNI_FALSE; } LOCK() is fhs_lock() on linux. Depending on how serious you wanted to be about error checking, just returning JNI_TRUE instead of JNI_FALSE should place the port in the enumerated list. The same sort of code will be found in RXTXPort(open) if ( LOCK( filename, pid ) ) { sprintf( message, "open: locking has failed for %s\n", filename ); report( message ); goto fail; } But the fail should result in a port in use exception fail: (*env)->ReleaseStringUTFChars( env, jstr, filename ); LEAVE( "RXTXPort:open" ); throw_java_exception( env, PORT_IN_USE_EXCEPTION, "open", strerror( errno ) ); open() is called when (SerialPort) RXTXPort("portname") is instantiated. enumeration/testRead() happens when (CommDriver) RXTXCommDriver.initialize is called from CommPortIdentifiers static initializer. From pholmes at crlopto.com Mon Aug 4 03:30:16 2003 From: pholmes at crlopto.com (Paul Holmes) Date: Mon, 4 Aug 2003 10:30:16 +0100 Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: Message-ID: OK, so you develop an application using RXTX and the javax.comm API, you get it working just fine, you build an installer and after a few trials and tribulations get that going (on your favourite distro), and with a great sense of satisfaction, you send out your software. The next day, you get your first call from a user - "I'm using Red Cat 7.8 and I can't see any serial ports." Half an hour later, "I'm using Deviant 9.1 and I can't see any serial ports." Minutes after that, "I'm using Whizz-Bang 106.32 and I can't see any serial ports." ... and the rest of the day is like that. You send them the RXTX troubleshooting guide, and they say, "Well thanks, but this is all new to me - it'll take me ages. Couldn't you have sorted this stuff out before you shipped your application?" Turns out, each of them had a different thing go wrong. This hasn't happened yet, to me at least, but sometime soon it might, and I'd like to prevent it if I can. Has anyone got any tips about how to write application code so that it can distinguish for itself between the several different mishaps that can make the ports disappear, and set each user on the right track from the outset? Also, the guide lists a lot of requirements, but I'm getting the impression that some of these apply at compile time and others at run time. Does anyone have a list of these, so we can avoid chasing compile-time-only requirements at install time? (I don't expect many users to recompile, or to know how to.) Does anyone have a good workaround for the fact that javax.comm "swallows" some exceptions generated by RXTX, instead of propagating them up as exceptions to the app code? Paul. ********************************************************************** This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). Please note that any unauthorised distribution, copying or use of this communication, or the information in it, is strictly prohibited. If you have received this communication in error, please notify us by email, by telephone: +44 1383 828800, or fax: +44 1383 828801, then delete the email and any copies of it. This communication is from CRL Opto Ltd., whose registered office is at 1 St David's Business Park, Dalgety Bay, Dunfermline, KY11 9PF, Scotland. This footnote also confirms that this email message has been checked for the presence of computer viruses. ********************************************************************** From taj at linuxgrrls.org Mon Aug 4 09:07:14 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Mon, 4 Aug 2003 16:07:14 +0100 (BST) Subject: [Rxtx] Deployment Troubleshooting In-Reply-To: References: Message-ID: On Mon, 4 Aug 2003, Paul Holmes wrote: > OK, so you develop an application using RXTX and the > javax.comm API, you get it working just fine, you build > an installer and after a few trials and tribulations > get that going (on your favourite distro), and with a > great sense of satisfaction, you send out your software. > > The next day, you get your first call from a user - > "I'm using Red Cat 7.8 and I can't see any serial ports." > Half an hour later, > "I'm using Deviant 9.1 and I can't see any serial ports." > Minutes after that, > "I'm using Whizz-Bang 106.32 and I can't see any serial ports." > ... and the rest of the day is like that. > > You send them the RXTX troubleshooting guide, and they say, > "Well thanks, but this is all new to me - it'll take > me ages. Couldn't you have sorted this stuff out before > you shipped your application?" > > Turns out, each of them had a different thing go wrong. > > This hasn't happened yet, to me at least, but sometime soon > it might, and I'd like to prevent it if I can. Has anyone > got any tips about how to write application code so that it > can distinguish for itself between the several different > mishaps that can make the ports disappear, and set each user > on the right track from the outset? > > Also, the guide lists a lot of requirements, but I'm > getting the impression that some of these apply at compile > time and others at run time. Does anyone have a list of > these, so we can avoid chasing compile-time-only requirements > at install time? (I don't expect many users to recompile, > or to know how to.) > > Does anyone have a good workaround for the fact that > javax.comm "swallows" some exceptions generated by RXTX, > instead of propagating them up as exceptions to the app > code? > > Paul. > I'm not sure which guidelines you mention. Some are written by others just sharing their experiences. Some are intended for developers or hobbiests. You are probably going to run into 3 user errors. 1) Misconfigured BIOS or missing kernel drivers. "Can minicom open the port?" 2) Permissions on the port and lock directory "Does the application work as superuser?" 3) Distros moving lock directories, changing groups, or just generally being even more stupid than they have in the past. Suggestion is to start a fan club for standards like the FHS. You could probably write a shell script that runs at install time that tests most of this. I don't know of anything that has been done in that area yet. The only right way to do this for customers is test what you will support and list in detail what is supported. It's not only port enumeration that can go wrong. With the Sun comm.jar eating exceptions, one can always opt to replace it. rxtx 2.1 will give you complete code but be in the gnu.io name space. Kaffe is working on their own modification of rxtx 2.1 that will be in javax.comm - fairly early at this point though. IBM also had something of a commapi for linux which is probably based on Sun's comm.jar. From laurent.vaills at dms.at Wed Aug 6 03:21:35 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 09:21:35 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? Message-ID: <1060161694.9459.77.camel@neo.sophia.dms.at> Hi all. I use rxtx to communicate with a serial device on many computers on many sites. So sometimes the device is not plugged correctly on the computer and so the application hangs when I try to read the data for the InputStream i got from the serial port. I try to use the ReceiveTimeout property and the application does not hang anymore when I try to read even if the device is not connected. - Is there a possibility to know that there's no device connected to the serial port? - Is there a possibility to know that there was a timeout when I tried to read ? (I looked to the notify* methods but found nothing good. The only thing I found is to test that myInputStream.read() returns 0.) I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). Thanks, Laurent From taj at linuxgrrls.org Wed Aug 6 04:04:51 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 11:04:51 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard with my resources. have you tried something simple like checking carrier detect (CD)? rhat 7.2 is fairly safe ground. From laurent.vaills at dms.at Wed Aug 6 11:15:20 2003 From: laurent.vaills at dms.at (Laurent Vaills) Date: Wed, 06 Aug 2003 17:15:20 -0000 Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: <1060190120.9459.117.camel@neo.sophia.dms.at> On Wed, 2003-08-06 at 12:04, Trent Jarvi wrote: > > > On Wed, 6 Aug 2003, Laurent Vaills wrote: > > > Hi all. > > > > I use rxtx to communicate with a serial device on many computers on many > > sites. > > So sometimes the device is not plugged correctly on the computer and so > > the application hangs when I try to read the data for the InputStream i > > got from the serial port. > > > > I try to use the ReceiveTimeout property and the application does not > > hang anymore when I try to read even if the device is not connected. > > > > - Is there a possibility to know that there's no device connected to the > > serial port? > > - Is there a possibility to know that there was a timeout when I tried > > to read ? (I looked to the notify* methods but found nothing good. The > > only thing I found is to test that myInputStream.read() returns 0.) > > > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > > > rxtx 1.4 ok. It sure solved many problems but supporting it is very hard > with my resources. We started this project with rxtx 1.4; I have to test rxtx 2.0.5 if it's stable for all our needs. > > have you tried something simple like checking carrier detect (CD)? I tested with 2.0.5 but myPort.isCD() always returns false. Laurent. > > rhat 7.2 is fairly safe ground. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx From pcolagrosso at yahoo.com Wed Aug 6 11:27:57 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 10:27:57 -0700 (PDT) Subject: [Rxtx] Accessing RXTX Discussion Archive Message-ID: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Hi, I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. When I click on the 'Rxtx Archives' link from 'Rxtx -- Java RXTX discussion' page (http://hex.linuxgrrls.org/mailman/listinfo/rxtx), I get the error message below. I am subscribed to the group, but is there a configuration/permissions problem which prevents me from accessing the archives? Thanks, Piero ___________________ Error Message ___________________________________ Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --------------------------------- Apache/2.0.47 (Gentoo/Linux) PHP/4.3.2 Server at www.regolith.co.uk Port 80 --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/a334e572/attachment-0006.html From jasmine at regolith.co.uk Wed Aug 6 11:53:47 2003 From: jasmine at regolith.co.uk (jasmine@regolith.co.uk) Date: Wed, 6 Aug 2003 18:53:47 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: <20030806172757.90400.qmail@web13904.mail.yahoo.com> References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. Yeah, it's broken. I'm trying to fix it but it's difficult right now as I've just moved from the UK to France and don't have a proper PC yet at home. Please do not shoot the admin, she is doing her best. :-) -Jas. From taj at linuxgrrls.org Wed Aug 6 12:53:41 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 19:53:41 +0100 (BST) Subject: [Rxtx] Accessing RXTX Discussion Archive In-Reply-To: References: <20030806172757.90400.qmail@web13904.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003 jasmine at regolith.co.uk wrote: > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm trying to access the archives for this group but am running into problems. I would appreciate if anybody can point me to the problem or provide an alternative way of obtaining the archives. > > Yeah, it's broken. I'm trying to fix it but it's difficult right now as > I've just moved from the UK to France and don't have a proper PC yet at > home. > > Please do not shoot the admin, she is doing her best. :-) > > -Jas. I'd just add that so many things happen with rxtx because people want to do it. There is nobody to fire, nobody to blame, ... Just great people doing things with their spare time. Jasmine answered because she cared. You can't find people like that. From pcolagrosso at yahoo.com Wed Aug 6 13:34:22 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 12:34:22 -0700 (PDT) Subject: [Rxtx] RS-485 Support Message-ID: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Hi, I'm fairly new with RXTX, so please bear with me if my question is too basic. I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? Is there any feature-level documentation or is the best thing to browse the code? Thanks In Advance, Piero --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/105a84f6/attachment-0006.html From taj at linuxgrrls.org Wed Aug 6 13:53:25 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 20:53:25 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806193422.86896.qmail@web13901.mail.yahoo.com> References: <20030806193422.86896.qmail@web13901.mail.yahoo.com> Message-ID: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. From pcolagrosso at yahoo.com Wed Aug 6 14:12:56 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 13:12:56 -0700 (PDT) Subject: [Rxtx] RS-485 Support In-Reply-To: Message-ID: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/c33aa403/attachment-0006.html From WCrucius at sandc.com Wed Aug 6 14:24:01 2003 From: WCrucius at sandc.com (Crucius, Wesley) Date: Wed, 6 Aug 2003 15:24:01 -0500 Subject: [Rxtx] RS-485 Support Message-ID: <2D7102AA9172D311A593009027B0C17555871B@ms06> You don't need an RS-485 capable board, you can get 232 to 485 converters that do their own transmitter enable functionality without software based control. Check out B&B electronics for several options. If you do choose an RS-485 capable board, you still need to be warry of whether or not it has hardware or software controlled transmitter enable. I have been highly unsuccessful in attempts to do software control of transmitter enable in NT/2k even when the board manufacturer, Comtrol I think it was, provided the necessary driver. I highly recommend Sealevel Systems, based strictly on a 5 year long positive experience in dealing with them... Wes -----Original Message----- From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] Sent: Wednesday, August 06, 2003 3:13 PM To: Java RXTX discussion Subject: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx _____ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/e93949c2/attachment-0006.html From taj at linuxgrrls.org Wed Aug 6 14:39:12 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 6 Aug 2003 21:39:12 +0100 (BST) Subject: [Rxtx] RS-485 Support In-Reply-To: <2D7102AA9172D311A593009027B0C17555871B@ms06> References: <2D7102AA9172D311A593009027B0C17555871B@ms06> Message-ID: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) From pcolagrosso at yahoo.com Wed Aug 6 15:03:23 2003 From: pcolagrosso at yahoo.com (Piero Colagrosso) Date: Wed, 6 Aug 2003 14:03:23 -0700 (PDT) Subject: [Rxtx] RS-485 Support & Access to Archive In-Reply-To: Message-ID: <20030806210323.58185.qmail@web13905.mail.yahoo.com> Wes & Trent, Thanks a lot for your suggestions. Jasmine, I didn't receive your previous post directly because I was initially subscribed to the digest (not the individual mails). No problem at all, regarding access to the Archive. This was in no way intended as a criticism! Just thought I'd point out the problem and check to see if the problem was on my side. You guys on this forum are a great bunch and very helpful! Best regards to all! Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Crucius, Wesley wrote: > You don't need an RS-485 capable board, you can get 232 to 485 converters > that do their own transmitter enable functionality without software based > control. Check out B&B electronics for several options. If you do choose > an RS-485 capable board, you still need to be warry of whether or not it has > hardware or software controlled transmitter enable. I have been highly > unsuccessful in attempts to do software control of transmitter enable in > NT/2k even when the board manufacturer, Comtrol I think it was, provided the > necessary driver. I highly recommend Sealevel Systems, based strictly on a > 5 year long positive experience in dealing with them... > > Wes > > -----Original Message----- > From: Piero Colagrosso [mailto:pcolagrosso at yahoo.com] > Sent: Wednesday, August 06, 2003 3:13 PM > To: Java RXTX discussion > Subject: Re: [Rxtx] RS-485 Support > > > Hi Trent, > > Thanks a lot for the advice. > > Just to make sure I understand, what you're suggesting is to use an RS-485 > expansion board which natively supports the multipoint access (e.g., the > Industio CP-132 board by Moxa or equivalent). > > If the above is correct, what would you suggest as an application-level > API for interfacing with the RS-485 hardware? What we are looking to > build is a data acquisition system based on the Bacnet MS/TP protocol > (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to > implement ourselves). Our target platform is Linux based on an > Intel-compatible hardware platform. > > Any further suggestions you have would be greatly appreciated! > > Thanks In Advance, > > Piero > > Trent Jarvi wrote: > > > > On Wed, 6 Aug 2003, Piero Colagrosso wrote: > > > Hi, > > > > I'm fairly new with RXTX, so please bear with me if my question is too > basic. > > > > I'm looking to find what is the level of RS-485 support which RXTX > provides. For example, does it support a multi-drop configuration where any > of the drops can transmit? > > > > Is there any feature-level documentation or is the best thing to browse > the code? > > > > Thanks In Advance, > > > > Piero > > > > rs485 support is there for people who know about the issues. It's very > ugly stuff to get into. You will find yourself worrying about things like > kernel timing and other things (wire length) that can be replaced with a > nominal chip. > > So as a person wanting you to do right, I suggest finding a hardware > solution. Yes rxtx could do what you want but it wont save you money in > the long run. what wes said. :) _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030806/67ba26bd/attachment-0006.html From taj at linuxgrrls.org Fri Aug 8 23:43:54 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 9 Aug 2003 06:43:54 +0100 (BST) Subject: [Rxtx] timeout or how to detect no connected device ? In-Reply-To: <1060161694.9459.77.camel@neo.sophia.dms.at> References: <1060161694.9459.77.camel@neo.sophia.dms.at> Message-ID: I have not forgot this question. I just swamped with teaching responsibities at the moment. On Wed, 6 Aug 2003, Laurent Vaills wrote: > Hi all. > > I use rxtx to communicate with a serial device on many computers on many > sites. > So sometimes the device is not plugged correctly on the computer and so > the application hangs when I try to read the data for the InputStream i > got from the serial port. > > I try to use the ReceiveTimeout property and the application does not > hang anymore when I try to read even if the device is not connected. > > - Is there a possibility to know that there's no device connected to the > serial port? > - Is there a possibility to know that there was a timeout when I tried > to read ? (I looked to the notify* methods but found nothing good. The > only thing I found is to test that myInputStream.read() returns 0.) > > I am using rxtx-1.4.15 on Linux (RedHat 7.{23}). > > Thanks, > Laurent > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Sun Aug 17 14:51:02 2003 From: dmcomer at swcp.com (Dave Comer) Date: Sun, 17 Aug 2003 14:51:02 -0600 Subject: [Rxtx] RXTX and Netbeans? Message-ID: <3F3FEAB6.8070203@swcp.com> Can anyone tell me if there is anything special that needs to be done to make RXTX work with the Netbeans IDE? Here's what I've done - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 - Installed rxtx per the instructions. - Compiled and ran the BlackBox sample. No luck. App seems to accept no input and issues the error message: Warning: Name: HorScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. I assume that's an X warning, but also assume BB should work. - Ran the application JavaKit from the tini1.11 (Dallas Semiconductor's java microcontroller development kit) fine and access there serial ports. - Did NOT modify CLASSPATH. - Tried writting a simple program in NetBeans. Netbeans doesn't seem to recognize javax.comm.CommPortIdentifier. This implies CLASSPATH needs to be modified. So, my question is really, does CLASSPATH need to be set (Not in installation instruction, as far as I can tell) to work with NetBeans? Thanks, Dave Comer From taj at linuxgrrls.org Sun Aug 17 15:31:50 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 17 Aug 2003 22:31:50 +0100 (BST) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003, Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? > > Here's what I've done > - Installed the j2sdk (on Linux) in /usr/local/java/j2sdk1.4.1_02 > - Installed rxtx per the instructions. > - Compiled and ran the BlackBox sample. No luck. App seems to > accept no input > and issues the error message: > > Warning: > Name: HorScrollBar > Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > I assume that's an X warning, but also assume BB should work. > > - Ran the application JavaKit from the tini1.11 (Dallas > Semiconductor's java > microcontroller development kit) fine and access there serial ports. > - Did NOT modify CLASSPATH. > - Tried writting a simple program in NetBeans. Netbeans doesn't seem to > recognize javax.comm.CommPortIdentifier. This implies CLASSPATH > needs to be modified. > > So, my question is really, does CLASSPATH need to be set (Not in > installation > instruction, as far as I can tell) to work with NetBeans? > Hi Dave I suspect you are actually using two different JDK's. Looking at netbeans.org you can specify to use the JDK that you installed rxtx into. " Compiling and executing with a different JDK You can compile and execute code with any JDK. It's often best to create a new compiler type for these purposes. So, let's say you want to compile and execute your code in the JDK 1.1. To do this, you would go to Tools | Options | Building | Compiler Types | External Compilation, right-click and create a new compiler type from the default one and set its External Compiler property to C:\jdk1.1\bin\javac.exe. Then set the specific class to use this new compiler (on a class' Execution on its property sheet) - now it compiles with JDK 1.1. " http://www.netbeans.org/kb/faqs/configuration.html#FAQ_20 " Setting default Compiler, Debugger, and Executor type The IDE has several Compiler, Debugger, and Executor types. One is selected as the default. To view or change it, see: FFJ 3.0 / NB 3.2 - Project menu | Settings | Java Sources | Default Compiler, etc. FFJ 4.0 / NB 3.3 - Tools | Options | Editing | Java Sources | Default Compiler, etc. " http://www.netbeans.org/kb/faqs/miscellaneous.html#FAQ_41 As I've not used NetBeans, this is just a best guess. From rwelty at averillpark.net Sun Aug 17 15:31:36 2003 From: rwelty at averillpark.net (Richard Welty) Date: Sun, 17 Aug 2003 17:31:36 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <3F3FEAB6.8070203@swcp.com> References: <3F3FEAB6.8070203@swcp.com> Message-ID: On Sun, 17 Aug 2003 14:51:02 -0600 Dave Comer wrote: > Can anyone tell me if there is anything special that needs to be done to > make RXTX work with the Netbeans IDE? if you're running inside the IDE, then you need to mount the jar file. if you're running outside, then certainly RXTXcomm.jar needs to be in the classpath. i've run RXTX with the app i'm developing in netbeans both ways, and it works fine. richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Mon Aug 18 05:48:10 2003 From: dmcomer at swcp.com (Dave Comer) Date: Mon, 18 Aug 2003 05:48:10 -0600 Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: References: <3F3FEAB6.8070203@swcp.com> <3F3FEAB6.8070203@swcp.com> Message-ID: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Trent and Richard, It turns out that the example I was using (Al Williams, "Embedded Internet Design"; listing 3-1) did not have 2 needed imports. The example imports only "javax.comm.*" and,. apparently needs "javax.comm.CommPort" and "javax.comm.CommPortIdentifier" imported (Which also require declaring or throwing "NoSuchPortExeption" and PortInUseException). I'm rather rusty in Java (Left off at 1.1 and am catching up) so if my memory serves me is because these two methods are in a separate package than the main "javax.comm.*" package (I haven't un-jar'd comm.jar to check this yet)? I was able to resolve the problem this by looking at the BlackBox.java file.The odd thing is that BlackBox.java still does not work correctly not accepting input. I may load that into the debugger and see what's up with that. Dave Comer From rwelty at averillpark.net Mon Aug 18 05:59:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Mon, 18 Aug 2003 07:59:06 -0400 (EDT) Subject: [Rxtx] RXTX and Netbeans? In-Reply-To: <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> References: <3F3FEAB6.8070203@swcp.com><3F3FEAB6.8070203@swcp.com> <5.2.0.9.0.20030818053907.00bac2b8@mail.swcp.com> Message-ID: On Mon, 18 Aug 2003 05:48:10 -0600 Dave Comer wrote: >The example > imports only "javax.comm.*" and,. apparently needs > "javax.comm.CommPort" and > "javax.comm.CommPortIdentifier" imported (Which also require declaring > or > throwing > "NoSuchPortExeption" and PortInUseException). ... > I was able to > resolve > the problem this by looking at the BlackBox.java file.The odd thing is > that > BlackBox.java still does not work correctly not accepting input. I may > load > that into the debugger and see what's up with that. good luck. i've opted to not use the javax.comm imports, but stick with the gnu.io categorization. things were complicated enough already... richard -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From dmcomer at swcp.com Tue Aug 19 07:07:29 2003 From: dmcomer at swcp.com (dmcomer@swcp.com) Date: Tue, 19 Aug 2003 13:07:29 GMT Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 Message-ID: <200308191307.NAA10103@yagi.swcp.com> Richard, One lst question if I may. Is there a good URL that you know of to read up on gnu.io? I saw a reference to that in the latest rxtx release and wondered about it. I assume is a FSF implimentation of a library to perform general purpose io? WHat I'm missing is how Java access gnu.io. I thought Java needed a JNI and I would assume gnu.io is intended to be linked in somehow (via rxtx; that is rxtx is the JNI to Java? Anyway, you can obviously tell I need more understanding. Thanks In Advance, Dave Comer From rwelty at averillpark.net Tue Aug 19 07:32:06 2003 From: rwelty at averillpark.net (Richard Welty) Date: Tue, 19 Aug 2003 09:32:06 -0400 (EDT) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: <200308191307.NAA10103@yagi.swcp.com> References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > One lst question if I may. Is there a good URL that you know of to read > up on gnu.io? I saw a reference to that in the latest rxtx release and > wondered about > it. I assume is a FSF implimentation of a library to perform general > purpose > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > JNI > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > that > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > understanding. the authors of RXTX can probably explain this better than i, but basically, the way sun wrote the licensing, it's not appropriate for RXTX to appear in the java comm package tree, so recent versions of RXTX show up in the gnu tree instead. you just import gnu.io.*, mount the jar (for netbeans) and put it in your classpath (external execution), and have at it with the same class and method names that you would use if the package was sitting in sun's location. if you're using an overlay that expects the sun location, there's more work involved, but i'm calling RXTX directly. i am looking at an epson printer package but it knows about RXTX so i don't need to play any silly games. richard (the system i'm working on uses RXTX reading from digital scales on com ports and writing to an Epson receipt printer on the parallel port, i'd post code fragments but there's NDA attached.) -- Richard Welty rwelty at averillpark.net Averill Park Networking 518-573-7592 Java, PHP, PostgreSQL, Unix, Linux, IP Network Engineering, Security From taj at linuxgrrls.org Tue Aug 19 14:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Tue, 19 Aug 2003 21:17:01 +0100 (BST) Subject: [Rxtx] Re: Rxtx Digest, Vol 5, Issue 11 In-Reply-To: References: <200308191307.NAA10103@yagi.swcp.com> Message-ID: On Tue, 19 Aug 2003, Richard Welty wrote: > On Tue, 19 Aug 2003 13:07:29 GMT dmcomer at swcp.com wrote: > > One lst question if I may. Is there a good URL that you know of to read > > up on gnu.io? I saw a reference to that in the latest rxtx release and > > wondered about > > it. I assume is a FSF implimentation of a library to perform general > > purpose > > io? WHat I'm missing is how Java access gnu.io. I thought Java needed a > > JNI > > and I would assume gnu.io is intended to be linked in somehow (via rxtx; > > that > > is rxtx is the JNI to Java? Anyway, you can obviously tell I need more > > understanding. > > the authors of RXTX can probably explain this better than i, but > basically, the way sun wrote the licensing, it's not appropriate for RXTX > to appear in the java comm package tree, so recent versions of RXTX show up > in the gnu tree instead. you just import gnu.io.*, mount the jar (for > netbeans) and put it in your classpath (external execution), and have at > it with the same class and method names that you would use if the package > was sitting in sun's location. > > if you're using an overlay that expects the sun location, there's more work > involved, but i'm calling RXTX directly. i am looking at an epson printer > package but it knows about RXTX so i don't need to play any silly games. > Good detailed reply. Or more simply. The rxtx team wrote the gnu.io package and it is licensed LGPL. rxtx 2.1 package gnu.io rxtx 2.0 under javax.comm older: rxtx 1.5 package gnu.io rxtx 1.4 under javax.comm To use rxtx 2.1 just replace javax.comm with gnu.io in your application (usually just imports). rxtx 2.1 also has some undocumented extensions We try to be as close to javax.comm as possible in practice and discourage people from using the extensions unless there is no option. From tpw3316 at ACRretail.com Tue Aug 19 14:36:59 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Tue, 19 Aug 2003 16:36:59 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> I'm having some trouble using the parallel port interface on Linux. I can do very simple short output to the port, but anything longer than a page or so causes a core dump. It appears to be a buffer overrun issue between rxtx and the driver. I think the getOutputBufferFree() method is all I need to pace the output and avoid the problem, however, that isn't implemented yet. Any help with a fix or workaround or a would be greatly appreciated. From taj at linuxgrrls.org Tue Aug 19 21:04:42 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 04:04:42 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F2D2@jaxmail.acr2000.com> Message-ID: On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. From prashantg10 at yahoo.com Tue Aug 19 22:33:32 2003 From: prashantg10 at yahoo.com (=?iso-8859-1?q?Prashant=20Gandhi?=) Date: Wed, 20 Aug 2003 05:33:32 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: Message-ID: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Hi All ! I am trying to use applet on thin terminal which has Linux base Kernel.For testing I am using Linux machine.I have install all the required components. e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even my application runs. When It comes to applet, everything is halts. It does not even show the listing of ports. Is it because applet can't run under root account or what might be the reasons. Can anybody tell me solution. Thanks in advance. Thanks and regards, Prashant. ===== With Regards, Prashant "Not a Miles away, But just a mail away" ________________________________________________________________________ Yahoo! India Promos: Win TVs, Bikes, DVD players & more! Go to http://in.promos.yahoo.com From son at openbx.net Tue Aug 19 22:55:22 2003 From: son at openbx.net (Son To) Date: Wed, 20 Aug 2003 00:55:22 -0400 (EDT) Subject: [Rxtx] Applet and Serial Port In-Reply-To: <20030820043332.37931.qmail@web10105.mail.yahoo.com> Message-ID: Java applets run withing the sandbox of the security manager. Applets must be signed to access the com port, but for development purposes you can put user_pref("signed.applets.codebase_principal_support", true); in your prefs.js located in ~/.mozilla/default/XYYrandomDirName I didn't use Java applet for my application. I used XUL and CSS for the GUI development and used mozilla Javascript SOAP library to communicate with apache Axis webservice backend which uses RXTX to access the com port. On Wed, 20 Aug 2003, Prashant Gandhi wrote: > Hi All ! > > I am trying to use applet on thin terminal which has > Linux base Kernel.For testing I am using Linux > machine.I have install all the required components. > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > my application runs. When It comes to applet, > everything is halts. It does not even show the listing > of ports. Is it because applet can't run under root > account or what might be the reasons. Can anybody tell > me solution. > Thanks in advance. > > Thanks and regards, > Prashant. > > ===== > With Regards, > Prashant > "Not a Miles away, But just a mail away" > > ________________________________________________________________________ > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > Go to http://in.promos.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Tue Aug 19 23:33:48 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 06:33:48 +0100 (BST) Subject: [Rxtx] Applet and Serial Port In-Reply-To: References: Message-ID: I placed this in the INSTALL document. I've never looked up the applet signing either though some have done it. If anyone has a link or info on signing I'll add that too. On Wed, 20 Aug 2003, Son To wrote: > Java applets run withing the sandbox of the security manager. > Applets must be signed to access the com port, but for development > purposes you can put > > user_pref("signed.applets.codebase_principal_support", true); > > in your prefs.js located in ~/.mozilla/default/XYYrandomDirName > > I didn't use Java applet for my application. I used XUL and CSS for > the GUI development and used mozilla Javascript SOAP library to > communicate with apache Axis webservice backend which uses RXTX to > access the com port. > > On Wed, 20 Aug 2003, Prashant Gandhi wrote: > > Hi All ! > > > > I am trying to use applet on thin terminal which has > > Linux base Kernel.For testing I am using Linux > > machine.I have install all the required components. > > e.g. JDK, RXTX. Everthing is fine. BlackBox runs ,even > > my application runs. When It comes to applet, > > everything is halts. It does not even show the listing > > of ports. Is it because applet can't run under root > > account or what might be the reasons. Can anybody tell > > me solution. > > Thanks in advance. > > > > Thanks and regards, > > Prashant. > > > > ===== > > With Regards, > > Prashant > > "Not a Miles away, But just a mail away" > > > > ________________________________________________________________________ > > Yahoo! India Promos: Win TVs, Bikes, DVD players & more! > > Go to http://in.promos.yahoo.com > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From dmcomer at swcp.com Wed Aug 20 05:38:48 2003 From: dmcomer at swcp.com (Dave Comer) Date: Wed, 20 Aug 2003 05:38:48 -0600 Subject: [Rxtx] gnu.io.* In-Reply-To: <20030820110002.D113E73194@mail.linuxgrrls.org> Message-ID: <5.2.0.9.0.20030820053656.00b24710@mail.swcp.com> Thanks Richard and Trent for the great explanaition! Clears up many of my questions. Dave Comer From tpw3316 at ACRretail.com Wed Aug 20 14:27:51 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Wed, 20 Aug 2003 16:27:51 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Thanks for the suggestions Trent, I added some debugging to the writeArray function in ParallelImp.c and the parameters and data all looked fine and the core dump happened after the first 80 column line of output. It must be timing/thread related since in some cases I can print a full page and others like this test case it broke after the first line of output. I have the error report from the VM followed by a gdb call stack from the core file. The Java VM is outputting an error message that starts as follows: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x420B4B31 Function=__libc_nanosleep+0x11 Library=java Current Java thread: at gnu.io.LPRPort.eventLoop(Native Method) at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) Dynamic libraries: -- several pages followed, cut out for brevity. gdb stack trace for the resulting 180Mb core file: #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 #1 0x40036185 in __pthread_timedsuspend_new () from /lib/i686/libpthread.so.0 #2 0x40033160 in pthread_cond_timedwait_relative () from /lib/i686/libpthread.so.0 #3 0x402e48b3 in os::Linux::safe_cond_timedwait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #4 0x402dc66a in ObjectMonitor::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #5 0x4030cae7 in ObjectSynchronizer::wait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #6 0x4028715f in JVM_MonitorWait () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #7 0x423f9b52 in ?? () #8 0x423f3ddb in ?? () #9 0x423f40e1 in ?? () #10 0x423f1104 in ?? () #11 0x40248116 in JavaCalls::call_helper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #12 0x402e2f45 in os::os_exception_wrapper () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #13 0x402481f4 in JavaCalls::call () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #14 0x40247cb4 in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #15 0x4024869b in JavaCalls::call_virtual () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #16 0x40290450 in thread_entry () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #17 0x40328037 in JavaThread::thread_main_inner () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #18 0x4032413f in JavaThread::run () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #19 0x402e194a in _start () from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 On Tue, 19 Aug 2003, Tim Wilkinson wrote: > I'm having some trouble using the parallel port interface on Linux. I can > do very simple short output to the port, but anything longer than a page or > so causes a core dump. It appears to be a buffer overrun issue between rxtx > and the driver. I think the getOutputBufferFree() method is all I need to > pace the output and avoid the problem, however, that isn't implemented yet. > > Any help with a fix or workaround or a would be greatly appreciated. It would be interesting to know what is causing the core dump. How many bytes are being sent on these large writes? With rxtx I've tried to avoid buffering at all. Programmers recieve and OutputStream and can use the Java API to obtain a BufferedOutputStream. So far I have only heard of one case where there may be a need for a buffered stream in rxtx but it was never confirmed. So I'd suggest trying the BufferedOutputStream in the Java API. If its still bailing, try to find out what is being passed to the native writeByteArray() in ParallelImp.c. We can pull it out of java and isolate if it is indeed a JNI side issue, hit it with a debugger, and remove threading issues. Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Wed Aug 20 15:25:36 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Wed, 20 Aug 2003 22:25:36 +0100 (BST) Subject: [Rxtx] Parallel Port usage In-Reply-To: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> References: <89BABD89E119D311BEFD00062905BAE405B9F30B@jaxmail.acr2000.com> Message-ID: Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. From reggiehg at yahoo.com Wed Aug 20 20:04:11 2003 From: reggiehg at yahoo.com (reggiehg@yahoo.com) Date: Wed, 20 Aug 2003 19:04:11 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030326153146.DBCC85D69E5@hex.linuxgrrls.org> Message-ID: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Hi, I'm cleaning up my lists: what's the difference between the rxtx at hex.linuxgrrls.org and rxtx at undine.linuxgrrls.org lists? TIA, Reggie __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From taj at linuxgrrls.org Wed Aug 20 20:17:01 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Thu, 21 Aug 2003 03:17:01 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821020411.55898.qmail@web41414.mail.yahoo.com> References: <20030821020411.55898.qmail@web41414.mail.yahoo.com> Message-ID: On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > Hi, > > I'm cleaning up my lists: what's the difference > between the rxtx at hex.linuxgrrls.org and > rxtx at undine.linuxgrrls.org lists? > > TIA, > > Reggie > [discarded duplicate email] The mail list used to be on hex but was moved to undine. You should be able to use just linuxgrrls.org. The actual machine may change again. So any of the following work but the last is probably best to use: rxtx at undine.linuxgrrls.org rxtx at hex.linuxgrrls.org rxtx at linuxgrrls.org From john_db_adams at yahoo.com Thu Aug 21 06:26:59 2003 From: john_db_adams at yahoo.com (John Adams) Date: Thu, 21 Aug 2003 05:26:59 -0700 (PDT) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: Message-ID: <20030821122659.76565.qmail@web13208.mail.yahoo.com> So how do I look at the archives ... every time I try I get a "page cannot be accessed" error Forbidden You don't have permission to access /pipermail/rxtx/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. --- Trent Jarvi wrote: > > On Wed, 20 Aug 2003 reggiehg at yahoo.com wrote: > > > Hi, > > > > I'm cleaning up my lists: what's the difference > > between the rxtx at hex.linuxgrrls.org and > > rxtx at undine.linuxgrrls.org lists? > > > > TIA, > > > > Reggie > > > > [discarded duplicate email] > > The mail list used to be on hex but was moved to > undine. You should be > able to use just linuxgrrls.org. The actual machine > may change again. So > any of the following work but the last is probably > best to use: > > rxtx at undine.linuxgrrls.org > rxtx at hex.linuxgrrls.org > rxtx at linuxgrrls.org > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From jasmine at linuxgrrls.org Thu Aug 21 09:00:35 2003 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Thu, 21 Aug 2003 16:00:35 +0100 (BST) Subject: [Rxtx] OT: hex vs. undine rxtx lists? In-Reply-To: <20030821122659.76565.qmail@web13208.mail.yahoo.com> References: <20030821122659.76565.qmail@web13208.mail.yahoo.com> Message-ID: <33291.192.91.75.30.1061478035.squirrel@mail.linuxgrrls.org> > So how do I look at the archives ... every time I try > I get a "page cannot be accessed" error > > Forbidden > > You don't have permission to access /pipermail/rxtx/ > on this server. Fraid they're broken at the moment, and won't be fixed til I get internet access here in France. Sorry, -J. From taj at parcelfarce.linux.theplanet.co.uk Fri Aug 22 09:52:37 2003 From: taj at parcelfarce.linux.theplanet.co.uk (taj@parcelfarce.linux.theplanet.co.uk) Date: Fri, 22 Aug 2003 16:52:37 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) Message-ID: forwarded to the mail-list. Will answer from there later today. -- Trent Jarvi taj at www.linux.org.uk ---------- Forwarded message ---------- Date: Fri, 22 Aug 2003 12:00:40 -0300 From: Beat Meier To: taj at www.linux.org.uk, rxtx at linuxgrrls.org Subject: rxtx-2.1-6 enhancements Hello First thanks to the nice rxtx package. I've some sugestions: I tried to use rxtx-2.1-6 and at the end it should work for me in an embedded systen with j2me. 1. It would be nice if /dev/ttyLT0 could be used as port too. This is used for internal lucent modems. I know I can install ttySX as this but why is it restricted to some names? 2. *.la files If you do a make install all *.la files will be installed in JRE Example: /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la Are this fill realy used? 2. To use rxtx in an embedded system it should be compilable by j2me. To do this it - sould have no awt/swing components (like Configure) - sould use NO depracted methods, because this were removed for j2me The only problem are the following classes: src/Config.java (I have removed it) src/RXTXPort.java which use monThread.stop(); (line 1894) which is deprated but so or so should not be used in mi opinion. I don't know what about the stop so I want to modify it. Normaly instead of calling stop a flag is set and the running process. As I see run has an eventLopp which is nativ. I don't have experience which nativ code ... what normally is done is something like: class MonitorThread extends Thread { private volatile boolean shouldRun = true; public void run() { while (shouldRun) { ... } } public void stop() { shouldRun = false; } } I've commented (for the momend) the stop line and so I could compile install and use the package in j2me successfully!! What to you think about it? Greetings Beat From tpw3316 at ACRretail.com Fri Aug 22 15:52:06 2003 From: tpw3316 at ACRretail.com (Tim Wilkinson) Date: Fri, 22 Aug 2003 17:52:06 -0400 Subject: [Rxtx] Parallel Port usage Message-ID: <89BABD89E119D311BEFD00062905BAE405B9F33C@jaxmail.acr2000.com> Hi Trent, Thanks again for the suggestions. I had been debugging on RedHat 7.3 with rxtx 1.4-15, although we had very similar results using rxtx 2.0-4 on RedHat 8.0 and 9.0. Since your last note I've switched to debugging using rxtx 2.0-5 on RedHat 9.0. I have not gotten the core dump yet in the current environment, but when I output enough to fill the printer's buffer, the VM hangs forever with no errors and if I kill the VM the parallel port is locked until I reboot (the port was also locked after the core dump on 7.3). Per your suggestion, I stubbed out the eventLoop() method in LPRPort.java using Thread.sleep(). With that in place, writeArray will throw an IOException with "Resource temporarily unavailable" in the message. I was able to use that exception to trigger another sleep() in my output routine and successfully wrote a complete 10 page report. For our purposes, I can live with this as a workaround. I'd would like to find a little better method of pacing the output. I tried the isPrinterBusy() method, but that always returned true. On Windows I have used the getOutputBufferFree() method successfully. I'm open to other suggestions and I'm willing to do some more testing to find the root of the problem. Just not sure where to go from here. I'll try to debug it further and find out where it is hanging in the busy state. I'll post any results when I get them. -----Original Message----- From: Trent Jarvi [mailto:taj at linuxgrrls.org] Sent: Wednesday, August 20, 2003 5:26 PM To: Java RXTX discussion Subject: RE: [Rxtx] Parallel Port usage Hi Tim This looks like a fun/ugly one. I'm curious. Does this happen with the 1.3.1 JRE also? I assume this is a newer kernel with NPTL. I worked around issues like this in the Serial portion of rxtx but not the Parallel code. If you are not using events for much, you could stub out the LPRPort.java MonitorThread and just do a java Thread.sleep() to eliminate that portion of the native code. hmm. The eventLoop in Parallel support is fairly simple. The Parallel code is not well tested though. On Wed, 20 Aug 2003, Tim Wilkinson wrote: > Thanks for the suggestions Trent, > > I added some debugging to the writeArray function in ParallelImp.c and the > parameters and data all looked fine and the core dump happened after the > first 80 column line of output. It must be timing/thread related since in > some cases I can print a full page and others like this test case it broke > after the first line of output. I have the error report from the VM > followed by a gdb call stack from the core file. > > The Java VM is outputting an error message that starts as follows: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x420B4B31 > Function=__libc_nanosleep+0x11 > Library=java > > Current Java thread: > at gnu.io.LPRPort.eventLoop(Native Method) > at gnu.io.LPRPort$MonitorThread.run(LPRPort.java:350) > > Dynamic libraries: > -- several pages followed, cut out for brevity. > > > gdb stack trace for the resulting 180Mb core file: > #0 0x420b4b31 in nanosleep () from /lib/i686/libc.so.6 > #1 0x40036185 in __pthread_timedsuspend_new () from > /lib/i686/libpthread.so.0 > #2 0x40033160 in pthread_cond_timedwait_relative () > from /lib/i686/libpthread.so.0 > #3 0x402e48b3 in os::Linux::safe_cond_timedwait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #4 0x402dc66a in ObjectMonitor::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #5 0x4030cae7 in ObjectSynchronizer::wait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #6 0x4028715f in JVM_MonitorWait () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #7 0x423f9b52 in ?? () > #8 0x423f3ddb in ?? () > #9 0x423f40e1 in ?? () > #10 0x423f1104 in ?? () > #11 0x40248116 in JavaCalls::call_helper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #12 0x402e2f45 in os::os_exception_wrapper () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #13 0x402481f4 in JavaCalls::call () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #14 0x40247cb4 in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #15 0x4024869b in JavaCalls::call_virtual () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #16 0x40290450 in thread_entry () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #17 0x40328037 in JavaThread::thread_main_inner () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #18 0x4032413f in JavaThread::run () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #19 0x402e194a in _start () > from /usr/java.orig/j2sdk1.4.1_01/jre/lib/i386/client/libjvm.so > #20 0x40033fef in pthread_start_thread () from /lib/i686/libpthread.so.0 > > > On Tue, 19 Aug 2003, Tim Wilkinson wrote: > > > I'm having some trouble using the parallel port interface on Linux. I can > > do very simple short output to the port, but anything longer than a page > or > > so causes a core dump. It appears to be a buffer overrun issue between > rxtx > > and the driver. I think the getOutputBufferFree() method is all I need to > > pace the output and avoid the problem, however, that isn't implemented > yet. > > > > Any help with a fix or workaround or a would be greatly appreciated. > > It would be interesting to know what is causing the core dump. How many > bytes are being sent on these large writes? > > With rxtx I've tried to avoid buffering at all. Programmers recieve and > OutputStream and can use the Java API to obtain a BufferedOutputStream. > So far I have only heard of one case where there may be a need for a > buffered stream in rxtx but it was never confirmed. > > So I'd suggest trying the BufferedOutputStream in the Java API. If its > still bailing, try to find out what is being passed to the native > writeByteArray() in ParallelImp.c. We can pull it out of java and isolate > if it is indeed a JNI side issue, hit it with a debugger, and remove > threading issues. > > Maybe write to a file the write thats causing a core dump if reproducable. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Fri Aug 22 22:12:26 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 05:12:26 +0100 (BST) Subject: [Rxtx] rxtx-2.1-6 enhancements (fwd) In-Reply-To: References: Message-ID: > > First thanks to the nice rxtx package. > I've some sugestions: > I tried to use rxtx-2.1-6 and at the end it should work for me > in an embedded systen with j2me. neat. > > 1. It would be nice if /dev/ttyLT0 could be used as port too. > This is used for internal lucent modems. I know I can > install ttySX as this but why is it restricted to some names? > I've intentionally avoided doing this. If you look in RXTXCommDrivers, the code to enumerate all ports on linux is in there. if(osName.equals("Linux")) { String[] Temp = { "ttyS", // linux Serial Ports "ttySA" // for the IPAQs }; CandidatePortPrefixes=Temp; } else if(osName.equals("Linux-all-ports")) { ... The long term solution for this is to use yet to be developed kernel features in linux. The kernel's enumeration will be exported into user space so enumeration will be significantly simpler. The reason the above change was made is enumeration can take a very long time (especially on things that would use j2me) if you enumerate every single port type. Your free to modify rxtx above so your ports are enumerated by default. It would make sense to just include rxtx with your application. > 2. *.la files > If you do a make install > all *.la files will be installed in JRE > Example: > /usr/local/jdev/jdk1.3.1_03/jre/lib/i386/librxtxSerial.la > Are this fill realy used? libtool does this when it installs. I don't see any reason to include them. There is probably a way to prevent libtool from doing that but I've not seen it. > > 2. To use rxtx in an embedded system it should be compilable > by j2me. To do this it > - sould have no awt/swing components (like Configure) > - sould use NO depracted methods, because this were removed for j2me > Configure can just be deleted. I'm not sure if anyone has even looked at it but it has some code for helping port enumeration. > The only problem are the following classes: > src/Config.java (I have removed it) > > src/RXTXPort.java > which use monThread.stop(); (line 1894) > which is deprated but so or so should not be used in mi opinion. > I don't know what about the stop so I want to modify it. > Normaly instead of calling stop a flag is set and the running process. > As I see run has an eventLopp which is nativ. I don't have experience > which nativ code ... > > what normally is done is something like: > > class MonitorThread extends Thread > { > private volatile boolean shouldRun = true; > > public void run() > { > while (shouldRun) > { > ... > } > } > > public void stop() > { > shouldRun = false; > } > } > > I've commented (for the momend) the stop line and so I could compile install > and use the package in j2me successfully!! > This change should be fine. If you send a patch in we will include it. From john_db_adams at yahoo.com Sat Aug 23 07:58:38 2003 From: john_db_adams at yahoo.com (John Adams) Date: Sat, 23 Aug 2003 06:58:38 -0700 (PDT) Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Hi there rxtx land Does rxtx2.1 work with windoze ? Thanks john __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com From dmarkman at mac.com Sat Aug 23 08:09:24 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:09:24 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: Message-ID: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Hi, did somebody try latest RXTX package on Panther (MAC OS X 10.3)? thanks Dmitry Markman From dmarkman at mac.com Sat Aug 23 08:30:01 2003 From: dmarkman at mac.com (Dmitry Markman) Date: Sat, 23 Aug 2003 10:30:01 -0400 Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <6685AAC2-D573-11D7-90BB-000393DC71BC@mac.com> Message-ID: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> I don't have the hardware right now but Jaguar installer worked for me: uucp group was created user was added to the uucp group folder /var/spool/uucp was created and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the folder /Library/Java/Extensions so theoretically it looks OK I'd like to be sure that RXTX works fine at the time of the Panther release (Apple promised that Panther should be released later in this year) Dmitry Markman On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > Hi, > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > thanks > > Dmitry Markman > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > From ricardo.trindade at emation.pt Sat Aug 23 08:44:05 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sat, 23 Aug 2003 15:44:05 +0100 Subject: [Rxtx] RS-485 Support In-Reply-To: <20030806201256.12718.qmail@web13908.mail.yahoo.com> Message-ID: I'd like to second the opinions that advise you to buy a 232->485 hw converter. They are very cheap, you can get automatic direction control, which means you won't have to manually drive the request to send, etc.. I have some from advantech, and some from B&B, both work great. you can also get them optically isolated, if you need it. as for your second question, what do you mean by API in this scenario ? 485 is just an electrical spec, so you can't implement a general 485 protocol. ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Piero Colagrosso Enviada: quarta-feira, 6 de Agosto de 2003 21:13 Para: Java RXTX discussion Assunto: Re: [Rxtx] RS-485 Support Hi Trent, Thanks a lot for the advice. Just to make sure I understand, what you're suggesting is to use an RS-485 expansion board which natively supports the multipoint access (e.g., the Industio CP-132 board by Moxa or equivalent). If the above is correct, what would you suggest as an application-level API for interfacing with the RS-485 hardware? What we are looking to build is a data acquisition system based on the Bacnet MS/TP protocol (MS/TP is a data-link layer which sits on top of RS-485 and which we plan to implement ourselves). Our target platform is Linux based on an Intel-compatible hardware platform. Any further suggestions you have would be greatly appreciated! Thanks In Advance, Piero Trent Jarvi wrote: On Wed, 6 Aug 2003, Piero Colagrosso wrote: > Hi, > > I'm fairly new with RXTX, so please bear with me if my question is too basic. > > I'm looking to find what is the level of RS-485 support which RXTX provides. For example, does it support a multi-drop configuration where any of the drops can transmit? > > Is there any feature-level documentation or is the best thing to browse the code? > > Thanks In Advance, > > Piero > rs485 support is there for people who know about the issues. It's very ugly stuff to get into. You will find yourself worrying about things like kernel timing and other things (wire length) that can be replaced with a nominal chip. So as a person wanting you to do right, I suggest finding a hardware solution. Yes rxtx could do what you want but it wont save you money in the long run. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx ---------------------------------------------------------------------------- -- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20030823/02af687c/attachment-0006.html From taj at linuxgrrls.org Sat Aug 23 15:00:09 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:09 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: <20030823135838.35370.qmail@web13205.mail.yahoo.com> References: <20030823135838.35370.qmail@web13205.mail.yahoo.com> Message-ID: ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From taj at linuxgrrls.org Sat Aug 23 15:00:57 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sat, 23 Aug 2003 22:00:57 +0100 (BST) Subject: [Rxtx] RXTX on Panther (MAC OS 10.3) In-Reply-To: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> References: <4796E386-D576-11D7-90BB-000393DC71BC@mac.com> Message-ID: Thanks for the heads up Dmmitry On Sat, 23 Aug 2003, Dmitry Markman wrote: > I don't have the hardware right now > > but Jaguar installer worked for me: > > uucp group was created > user was added to the uucp group > folder /var/spool/uucp was created > and files librxtxSerial.jnilib and RXTXcomm.jar were placed into the > folder > /Library/Java/Extensions > > so theoretically it looks OK > > I'd like to be sure that RXTX works fine at the time of the Panther > release > (Apple promised that Panther should be released later in this year) > > Dmitry Markman > > > > On Saturday, Aug 23, 2003, at 10:09 US/Eastern, Dmitry Markman wrote: > > > > > Hi, > > > > did somebody try latest RXTX package on Panther (MAC OS X 10.3)? > > > > thanks > > > > Dmitry Markman > > > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > From ricardo.trindade at emation.pt Sat Aug 23 17:29:08 2003 From: ricardo.trindade at emation.pt (Ricardo Trindade) Date: Sun, 24 Aug 2003 00:29:08 +0100 Subject: [Rxtx] rxtxwin32 In-Reply-To: Message-ID: Hi, I have used rxtx to implement protocols for several devices on 485 networks. I noticed the open issue you mention about using the terminating character to check for reads. I use this method, but implemented in my code, after the serial port reads. Will it be added to the rxtx core ? If so I'd like to suggest something : I found several serial protocols where the terminating char isn't specified, for example the terminating char varies depending on the first message character. What I've done in java is that each command that can be sent to a 485 module specifies a method that checks for command termination. Perhaps you could do something similar, in my experience (at least in 485) just specifying the end char is very limiting. thanks Ricardo -----Mensagem original----- De: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]Em nome de Trent Jarvi Enviada: sabado, 23 de Agosto de 2003 22:00 Para: Java RXTX discussion Assunto: Re: [Rxtx] rxtxwin32 ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16/binaries/ ftp://jarvi.dsl.frii.com/pub/rxtx-2.1-7pre16.tar.gz The following issues are known on w32: # Baudrates of 128000 * N may have problems # Add a method for re-checking for valid ports # Add support in RXTX to specify valid ports on the PC. # Adding support for half duplex serial communication. # Error events for parity errors. # Baudrate of 5 # serial break time # terminating character checking for reads # Event listeners need to be added when the port is opened to initialize the native structures. # Closing a port from an event listener results in a deadlock. # Closing a port without adding an event listener results in a deadlock. On Sat, 23 Aug 2003, John Adams wrote: > > Hi there rxtx land > > Does rxtx2.1 work with windoze ? > Thanks > john > > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://hex.linuxgrrls.org/mailman/listinfo/rxtx > _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://hex.linuxgrrls.org/mailman/listinfo/rxtx From taj at linuxgrrls.org Sat Aug 23 18:17:15 2003 From: taj at linuxgrrls.org (Trent Jarvi) Date: Sun, 24 Aug 2003 01:17:15 +0100 (BST) Subject: [Rxtx] rxtxwin32 In-Reply-To: References: Message-ID: Hi Ricardo I looked at this some while fixing problems and diagnosing others for a company. I'd be very flexible in how this is done as I'm not using custom terminator characters. I'd be open for input on this. I'm just going by memory right now but I think the terminator character can be set in the termios struct on POSIX systems and w32 had simular functionality. There was some discussion at one point off the list about supporting 16 bit terminators. Implementing something in rxtx would not be too hard but I'd really need input from someone like you that has experience using them to give something like a javadoc description of the API level calls and behavior you want. I guess a good place to start is to clear up some confusion on my part. Are we talking about enableReceiveFraming( int frammingByte )? But you would like this to perhaps happen on write()? Maybe: write( ..., int frammingByte ); ? As you can probably tell, I just didnt know for sure what to do here. Just putting a guess in didn't make sense. On Sun, 24 Aug 2003, Ricardo Trindade wrote: > Hi, > > I have used rxtx to implement protocols for several devices on 485 > networks. I noticed the open issue you mention about using the terminating > character to check for reads. I use this method, but implemented in my code, > after the serial port reads. > > Will it be added to the rxtx core ? If so I'd like to suggest something : > > I found several serial protocols where the terminating char isn't > specified, for example the terminating char varies depending on the first > message character. What I've done in java is that each command that can be > sent to a 485 module specifies a method that checks for command termination. > Perhaps you could do something